You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1041) |
Sep
(746) |
Oct
(46) |
Nov
(89) |
Dec
(117) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(21) |
Feb
(236) |
Mar
(316) |
Apr
(166) |
May
(114) |
Jun
(18) |
Jul
(23) |
Aug
(10) |
Sep
(35) |
Oct
(8) |
Nov
(44) |
Dec
(54) |
| 2007 |
Jan
(7) |
Feb
(21) |
Mar
(3) |
Apr
(1) |
May
|
Jun
(78) |
Jul
(9) |
Aug
(12) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
|
From: Conrado P. <con...@us...> - 2006-12-11 23:54:12
|
Update of /cvsroot/smartwin/SmartWin/tests/WidgetComboBox In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv22670/tests/WidgetComboBox Modified Files: Main.cpp Log Message: Added removeItem to WidgetComboBox Added redrawItems to WidgetDataGrid Index: Main.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/WidgetComboBox/Main.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- Main.cpp 5 May 2006 21:33:09 -0000 1.9 +++ Main.cpp 11 Dec 2006 23:54:03 -0000 1.10 @@ -57,6 +57,8 @@ assert( comboBox->getCount() == 7 ); assert( comboBox->getValue( 0 ) == _T( "Value1" ) ); assert( comboBox->getValue( 6 ) == _T( "Value7" ) ); + comboBox->removeItem( 6 ); + assert( comboBox->getCount() == 6 ); comboBox->onSelectionChanged( & WidgetTest1::selectionChanged ); |
|
From: Conrado P. <con...@us...> - 2006-12-11 23:54:12
|
Update of /cvsroot/smartwin/SmartWin/tests/WidgetList In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv22670/tests/WidgetList Modified Files: Main.cpp Log Message: Added removeItem to WidgetComboBox Added redrawItems to WidgetDataGrid Index: Main.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/WidgetList/Main.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- Main.cpp 5 May 2006 17:21:45 -0000 1.22 +++ Main.cpp 11 Dec 2006 23:54:04 -0000 1.23 @@ -287,6 +287,10 @@ values.push_back( _T( "Row2Col4Value" ) ); list->insertRow( values, - 1, - 1, 1 ); + // Compile tests + list->redrawItems(); + list->redrawItems( 1, 1 ); + mainMenu = createMenu(); WidgetMenuPtr view = mainMenu->appendPopup( _T( "&View" ) ); view->appendItem( LVS_REPORT, _T( "&Report" ), & WidgetTest1::menuEventHandler ); |
|
From: Conrado P. <con...@us...> - 2006-12-11 23:54:12
|
Update of /cvsroot/smartwin/SmartWin/include/smartwin/widgets In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv22670/include/smartwin/widgets Modified Files: WidgetComboBox.h WidgetDataGrid.h Log Message: Added removeItem to WidgetComboBox Added redrawItems to WidgetDataGrid Index: WidgetComboBox.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/widgets/WidgetComboBox.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- WidgetComboBox.h 23 Jun 2006 22:38:13 -0000 1.24 +++ WidgetComboBox.h 11 Dec 2006 23:54:00 -0000 1.25 @@ -153,6 +153,9 @@ */ void removeAllItems(); + /// Remove an item from the ComboBox + void removeItem( int index ); + /// Appends a value to the ComboBox. /** The return value is the index of the new item appended. */ @@ -282,6 +285,12 @@ } template< class EventHandlerClass, class MessageMapPolicy > +void WidgetComboBox< EventHandlerClass, MessageMapPolicy >::removeItem( int index ) +{ + ComboBox_DeleteString( this->Widget::itsHandle, index ); +} + +template< class EventHandlerClass, class MessageMapPolicy > int WidgetComboBox< EventHandlerClass, MessageMapPolicy >::addValue( const SmartUtil::tstring & val ) { int newIdx = ComboBox_AddString( this->Widget::itsHandle, ( TCHAR * ) val.c_str() ); Index: WidgetDataGrid.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/widgets/WidgetDataGrid.h,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- WidgetDataGrid.h 9 Sep 2006 19:19:49 -0000 1.37 +++ WidgetDataGrid.h 11 Dec 2006 23:54:03 -0000 1.38 @@ -808,23 +808,23 @@ */ unsigned getRowNumberFromLParam( unsigned lParam ); - /// Set the normal image list for the Data Grid. - /** normalImageList is the image list that contains the images - * for the data grid icons in Icon View (big icons). - */ - void setNormalImageList( ImageListPtr normalImageList ); + /// Set the normal image list for the Data Grid. + /** normalImageList is the image list that contains the images + * for the data grid icons in Icon View (big icons). + */ + void setNormalImageList( ImageListPtr normalImageList ); - /// Set the small image list for the Data Grid. - /** smallImageList is the image list that contains the images - * for the data grid icons in Report, List & Small Icon Views. - */ - void setSmallImageList( ImageListPtr smallImageList ); + /// Set the small image list for the Data Grid. + /** smallImageList is the image list that contains the images + * for the data grid icons in Report, List & Small Icon Views. + */ + void setSmallImageList( ImageListPtr smallImageList ); - /// Set the state image list for the Data Grid. - /** stateImageList is the image list that contains the images - * for the data grid icons states. - */ - void setStateImageList( ImageListPtr stateImageList ); + /// Set the state image list for the Data Grid. + /** stateImageList is the image list that contains the images + * for the data grid icons states. + */ + void setStateImageList( ImageListPtr stateImageList ); /// Change the view for the Data Grid. /** The view parameter can be one of LVS_ICON, LVS_SMALLICON, LVS_LIST or @@ -833,6 +833,16 @@ */ void setView( int view ); + /// Force redraw of a range of items. + /** You may want to call invalidateWidget after the this call to force repaint. + */ + void redrawItems( int firstRow, int lastRow ); + + /// Force redraw all items. + /** You may want to call invalidateWidget after the this call to force repaint. + */ + void redrawItems(); + /// Actually creates the Data Grid Control /** You should call WidgetFactory::createDataGrid if you instantiate class * directly. <br> @@ -1391,6 +1401,21 @@ } template< class EventHandlerClass, class MessageMapPolicy > +void WidgetDataGrid< EventHandlerClass, MessageMapPolicy >::redrawItems( int firstRow, int lastRow ) +{ + if( ListView_RedrawItems( this->Widget::handle(), firstRow, lastRow ) == FALSE ) + { + throw xCeption( _T( "Error while redrawing items in ListView" ) ); + } +} + +template< class EventHandlerClass, class MessageMapPolicy > +void WidgetDataGrid< EventHandlerClass, MessageMapPolicy >::redrawItems() +{ + this->redrawItems( 0, this->getRowCount() ); +} + +template< class EventHandlerClass, class MessageMapPolicy > void WidgetDataGrid< EventHandlerClass, MessageMapPolicy >::setCheckBoxes( bool value ) { addRemoveListViewExtendedStyle( LVS_EX_CHECKBOXES, value ); |
|
From: andrew7 <bd...@us...> - 2006-12-10 22:58:13
|
Update of /cvsroot/smartwin/SmartWin/include/smartwin In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv2772/include/smartwin Modified Files: doxygen.h Log Message: They are now WidgetDataGrid Event Handlers Index: doxygen.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/doxygen.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- doxygen.h 5 May 2006 17:14:37 -0000 1.5 +++ doxygen.h 10 Dec 2006 22:58:08 -0000 1.6 @@ -28,21 +28,6 @@ * */ -/** \defgroup EventHandlersWidgetList Event Handlers for WidgetList - * \EventHandlerGenericInfo - */ - -/** \defgroup EventHandlersWidgetMenu Event Handlers for WidgetMenu - * \EventHandlerGenericInfo - */ - -/** \defgroup EventHandlersWidgetToolbar Event Handlers for WidgetToolbar - * \EventHandlerGenericInfo - */ - -/** \defgroup EventHandlersWidgetTreeView Event Handlers for WidgetTreeView - * \EventHandlerGenericInfo - */ /** \defgroup EventHandlersAspectClickable Event Handlers for AspectClickable * \EventHandlerGenericInfo @@ -112,6 +97,23 @@ * \EventHandlerGenericInfo */ +/** \defgroup EventHandlersWidgetDataGrid Event Handlers for WidgetDataGrid + * \EventHandlerGenericInfo + */ + +/** \defgroup EventHandlersWidgetMenu Event Handlers for WidgetMenu + * \EventHandlerGenericInfo + */ + +/** \defgroup EventHandlersWidgetToolbar Event Handlers for WidgetToolbar + * \EventHandlerGenericInfo + */ + +/** \defgroup EventHandlersWidgetTreeView Event Handlers for WidgetTreeView + * \EventHandlerGenericInfo + */ + + /** \mainpage Documentation for SmartWin++ * \htmlinclude guide.html */ |
|
From: andrew7 <bd...@us...> - 2006-12-10 22:46:25
|
Update of /cvsroot/smartwin/SmartWin/tests In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv30199/tests Modified Files: testcheck.html Log Message: Latest status as of Dec 10th, 2006 Index: testcheck.html =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/testcheck.html,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- testcheck.html 26 Mar 2006 03:16:19 -0000 1.6 +++ testcheck.html 10 Dec 2006 22:46:18 -0000 1.7 @@ -29,15 +29,15 @@ <TR> <TD>AddressBook</TD> <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> - <TD></TD> - <TD>works, ASW Mar 22, 2006</TD> + <TD>Works as of 9 Dec 2006, asw</TD> + <TD>?</TD> + <TD>works, ASW Mar 22, 2006</TD> </TR> <TR> <TD>Calculator</TD> <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> - <TD></TD> + <TD>Works as of 9 Dec 2006, asw</TD> + <TD>?</TD> <TD> <P>Norwegian resource .rc file does not work now.</P> <P>worked, ASW Nov 13, 2005</P> @@ -46,40 +46,47 @@ <TR> <TD>Canvas</TD> <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>Works as of 9 Dec 2006, asw</TD> <TD>Doesn't exists with a Win CE sample project</TD> - <TD> - works, ASW Mar 22, 2006</TD> + <TD> works, ASW Mar 22, 2006</TD> </TR> <TR> <TD>CustomWidget</TD> <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>Works as of 9 Dec 2006, asw</TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD bgColor="red">Runtime misfunction. (comes up but the colored circle turns into a curved increasing function for the upper left quadrant. The color switching does not work.) ASW Nov 13, 2005</TD> </TR> + + <TR> + <TD>DragAndDrop</TD> + <TD>Works as of 10 Dec 2006, asw</TD> + <TD>Works as of 9 Dec 2006, asw</TD> + <TD>?</TD> + <TD>?</TD> + </TR> + <TR> <TD>FreeDialog</TD> <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>Works as of 9 Dec 2006, asw</TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD>works, ASW Mar 22, 2006</TD> </TR> <TR> <TD>HelloSmartWin</TD> <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>Works as of 9 Dec 2006, asw</TD> <TD></TD> - <TD bgColor="lime"> - works, (but large fonts in WidgetDataGrid don't resize correctly though.) + <TD> works, (but large fonts in WidgetDataGrid don't resize correctly though.) ASW Mar 21, 2006</TD> </TR> <TR> <TD>HelloSmartWinWorld</TD> <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>Works as of 9 Dec 2006, asw</TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD> <P>works ASW Mar 22, 2006, BUT Mar 25 can't close the window !</P> @@ -90,7 +97,7 @@ <TD>Works as of 10. Dec 2005<BR> Though when not started from inside the IDE it doesn't find the initialization files so it doesn't display google/ibm etc in the combo box...</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>Depends on SmartSoap, which does not build. Dec 6, 2006, asw</TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD bgColor="red"> <P> @@ -119,19 +126,28 @@ </TD> </TR> <TR> - <TD style="HEIGHT: 22px">Notepad</TD> - <TD style="HEIGHT: 22px">Works as of 10. Dec 2005</TD> - <TD style="HEIGHT: 22px">Works as of 10. Dec 2005</TD> - <TD style="HEIGHT: 22px">Doesn't exists with a Win CE sample project</TD> - <TD style="HEIGHT: 22px">works. Font change, typing, arrows, copy and paste, Save + <TD>Notepad</TD> + <TD>Works as of 10. Dec 2005</TD> + <TD>Works as of 9 Dec 2006, asw</TD> + <TD>Doesn't exists with a Win CE sample project</TD> + <TD>works. Font change, typing, arrows, copy and paste, Save and Load filedo work.(Find needs a selection in the text to work) ASW Nov 15, 2005</TD> </TR> + + <TR> + <TD>OpenGLSample1</TD> + <TD>Works as of 9 Dec 2006, asw</TD> + <TD>Works as of 9 Dec 2006, asw</TD> + <TD>Doesn't exists with a Win CE sample project</TD> + <TD></TD> + </TR> + <TR> <TD>SampleWidgets</TD> <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> - <TD></TD> + <TD>Works as of 9 Dec 2006, asw</TD> + <TD>?</TD> <TD> <P>Compiles but only with a dummy function for DateTime_SetMonthCalColor. ASW Nov 13, 2005</P> @@ -139,8 +155,8 @@ </TR> <TR> <TD>sw_mdi</TD> - <TD>Works as of 10. Dec 2005</TD> - <TD>Works UNTIL you choose the Creation Widgets menu item!!</TD> + <TD>Works as of 9 Dec 2006, asw</TD> + <TD>Works as of 9 Dec 2006, asw</TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD bgColor="yellow">Comes up after a very long compile. ASW Nov 20, 2005. (Takes very long on SUSE GCC4) All windows can be created, but after around 4-5 @@ -153,7 +169,7 @@ <TR> <TD>swDll</TD> <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD bgColor="yellow">No .dev file</TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD>Untested in wine. The source is too new for the release version used to tryWine. ASW Nov 13, 2005</TD> @@ -169,64 +185,74 @@ <TR> <TD>TicTacTo</TD> <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>Works as of 9 Dec 2006, asw</TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD>works. ASW Nov 13, 2005</TD> </TR> <TR> <TD>TimerTest</TD> <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>Works as of 9 Dec 2006, asw</TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD>works. ASW Nov 13, 2005</TD> </TR> <TR> <TD>WidgetButton</TD> <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>Works as of 9 Dec 2006, asw</TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD>works. ASW Mar 22, 2006</TD> </TR> <TR> <TD>WidgetButtonTrigger</TD> <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>Works as of 9 Dec 2006, asw</TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD>works. ASW Nov 13, 2005</TD> </TR> <TR> <TD>WidgetCheckBox</TD> <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>Works as of 9 Dec 2006, asw</TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD>works. ASW Nov 13, 2005</TD> </TR> <TR> <TD>WidgetCombo</TD> <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>Works as of 9 Dec 2006, asw</TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD>works. ASW Nov 13, 2005</TD> </TR> <TR> <TD>WidgetDateTime</TD> <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>Works as of 9 Dec 2006, asw</TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD>works ( But top widget does not show the selected dat/time, and retrieve date on linux uses 0 mins and secs. ) ASW Mar 22, 2006</TD> </TR> + + <TR> + <TD>WidgetDialog</TD> + <TD>Works as of 9 Dec 2006, asw</TD> + <TD bgColor="yellow"> Compiles, but does not run as of 9 Dec 2006, asw</TD> + <TD>Doesn't exists with a Win CE sample project</TD> + <TD></TD> + </TR> + + <TR> <TD>WidgetFun</TD> <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>Works as of 9 Dec 2006, asw</TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD>works. ASW Nov 13, 2005</TD> </TR> <TR> <TD>WidgetGraph</TD> <TD>works ASW Nov 16, 2005</TD> - <TD>DEV-C++ has trouble compiling. ASW Nov 16, 2005</TD> + <TD>Works, Dec 9, 2006, asw </TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD>works, but takes a huge time to build. ( with template compile warnings ) ASW Nov 16, 2005</TD> @@ -234,7 +260,7 @@ <TR> <TD>WidgetInherited</TD> <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>Works as of 9 Dec 2006</TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD>works. ASW Nov 13, 2005</TD> </TR> @@ -249,52 +275,48 @@ <TR> <TD>WidgetLoadFile</TD> <TD>Works as of 10. Dec 2005</TD> - <TD> - <P>Doesn't compile as of 10. December 2005 due to CoInitialize, probably just a - library which must be included</P> - </TD> + <TD>Works as of 9 Dec 2006, asw </TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD>works. ASW Nov 13, 2005</TD> </TR> <TR> <TD>WidgetMDIWindow</TD> <TD>Works as of 10. Dec 2005</TD> - <TD>Doesn't work when you click a new MDI Child window...</TD> + <TD>Works as of 9 Dec 2006</TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD bgColor="red"> runtime misfunction error 87 ASW Mar 22, 2006</TD> </TR> <TR> - <TD>WidgetMenu - </TD> + <TD>WidgetMenu </TD> <TD>Works as of 10. Dec 2005<BR> Icons doesn't show up if started from the debug folder instead of through the IDE since it relies on finding the bmp/icon files which exists in the sample root directory and not within the debug folder.</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>Works as of 10 Dec 2006, asw </TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD bgColor="lime">works, but the new fancy menu does not display its "File Menu" banner, and the font is small on Linux. ASW Mar 22, 2006</TD> </TR> <TR> - <TD style="HEIGHT: 22px">WidgetMessageBox</TD> - <TD style="HEIGHT: 22px">Note ASTERIX shows up as a !</TD> - <TD style="HEIGHT: 22px">Works as of 10. Dec 2005</TD> - <TD style="HEIGHT: 22px">Doesn't exists with a Win CE sample project</TD> - <TD style="HEIGHT: 22px">works.but MB_CANCELTRYCONTINUE is not defined, thus + <TD >WidgetMessageBox</TD> + <TD >Note ASTERIX shows up as a !</TD> + <TD >Works as of 9 Dec 2006, asw</TD> + <TD >Doesn't exists with a Win CE sample project</TD> + <TD >works.but MB_CANCELTRYCONTINUE is not defined, thus onlypartial functionality. Note ASTERIX shows up as a !.ASW Nov 13, 2005</TD> </TR> <TR> <TD>WidgetModalDialog</TD> <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>Works as of 9 Dec 2006, asw</TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD>works. ASW Nov 13, 2005</TD> </TR> <TR> <TD>WidgetProgressBar</TD> <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>Works as of 10 Dec 2006, asw </TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD> <P>works (needed a updateWidget() call after each change to the position). Looks @@ -304,102 +326,101 @@ </TR> <TR> <TD>WidgetRadioButtonGroup</TD> - <TD>Did notice that Radio 1-2 position is a bit strange</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>Works as of 10 Dec 2006, asw</TD> + <TD>Works as of 10 Dec 2006, asw</TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD>works. Did notice that Radio 1-2 position is a bit strange ASW Nov 13, 2005</TD> </TR> <TR> <TD>WidgetRichTextBox</TD> - <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>Works as of 10 Dec 2005</TD> + <TD>Works as of 10 Dec 2006, asw</TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD>works. ASW Nov 13, 2005</TD> </TR> <TR> <TD>WidgetSaveFile</TD> - <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>Works as of 10 Dec 2005</TD> + <TD>Works as of 10 Dec 2006, asw</TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD>works. ASW Nov 13, 2005</TD> </TR> <TR> <TD>WidgetSlider</TD> <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>Works as of 10 Dec 2006, asw</TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD>works. ASW Nov 13, 2005</TD> </TR> <TR> <TD>WidgetSpinner</TD> <TD>Double invocation from onScrollHorz.</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>Works as of 10 Dec 2006, asw</TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD>works. ASW Nov 13, 2005</TD> </TR> <TR> <TD>WidgetSplitter</TD> - <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD bgColor="red"> Does not appear to work, 10 Dec 2006, asw </TD> + <TD bgColor="red"> Does not appear to work, 10 Dec 2006, asw </TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD>works. ASW Nov 13, 2005</TD> </TR> <TR> <TD>WidgetStatic</TD> <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>Works as of 10 Dec 2006, asw</TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD>works. ASW Nov 13, 2005</TD> </TR> <TR> <TD>WidgetStatusBar</TD> <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>Works as of 10 Dec 2006, asw</TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD>works. ASW Nov 13, 2005</TD> </TR> <TR> <TD>WidgetTabControl</TD> <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>Works as of 10 Dec 2006, asw</TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD>works. ASW Nov 13, 2005</TD> </TR> <TR> <TD>WidgetTextBox</TD> - <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>Works as of 10 Dec 2006, asw</TD> + <TD>Works as of 10 Dec 2006, asw</TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD>works. ASW Nov 13, 2005</TD> </TR> <TR> <TD>WidgetToolbar</TD> - <TD>Works as of 10. Dec 2005</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>Works as of 10 Dec 2006, asw</TD> + <TD>Works as of 10 Dec 2006, asw</TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD>works. ASW Nov 13, 2005</TD> </TR> <TR> <TD>WidgetTreeView</TD> - <TD>Works as of 10. Dec 2005</TD> - <TD>Works but gives compile time warning!!</TD> + <TD>Works as of 10 Dec 2006, asw</TD> + <TD>Works as of 10 Dec 2006, asw</TD> <TD>Doesn't exists with a Win CE sample project</TD> <TD>works. ASW Mar 22, 2006</TD> </TR> <TR> <TD>WidgetWindow</TD> - <TD>Works as of 10. Dec 2005</TD> + <TD>works as Dec 10, 2006, asw</TD> + <TD>works as Dec 10, 2006, asw</TD> <TD>Doesn't exists with a Win CE sample project</TD> - <TD>works. (docks, undocks,moves around )close with docked window still does not - work..ASW Nov 16, 2005</TD> - <TD bgColor="lime">works. ASW Mar 22, 2006</TD> + <TD>works. ASW Mar 22, 2006</TD> </TR> <TR> <TD>WidgetWindowSubclassed</TD> <TD>Works as of 10. Dec 2005</TD> <TD>Works as of 10. Dec 2005</TD> <TD>Doesn't exists with a Win CE sample project</TD> - <TD>works. ASW Mar 22, 2006</TD> + <TD>works. ASW Mar 22, 2006</TD> </TR> </TABLE> <P></P> |
|
From: andrew7 <bd...@us...> - 2006-12-10 22:44:15
|
Update of /cvsroot/smartwin/SmartWin/doxygenIn/html In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29321/doxygenIn/html Modified Files: guide.html Log Message: Add reference to Sally IDE. Index: guide.html =================================================================== RCS file: /cvsroot/smartwin/SmartWin/doxygenIn/html/guide.html,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- guide.html 30 Nov 2006 00:30:47 -0000 1.10 +++ guide.html 10 Dec 2006 22:44:08 -0000 1.11 @@ -10,7 +10,7 @@ boxes</a> takes 212 KB and have no additional DLL dependencies!<br> This is vital since SmartWin is a static library by default meaning less pain in versioning and upgrades of software.<br> - The SOAP parts and the GUI parts is not in any ways dependant upon eachother + The SOAP parts and the GUI parts are not dependant upon each other and both can be used separately without using the other. This means you can use SmartSOAP e.g. in an MFC application or you can use e.g. gSOAP in a SmartWin++ application and so on. @@ -43,6 +43,11 @@ GCC 3.4 / MinGW or later (see <a href="devcpp.html">Bloodshed Dev++</a> or <a href="eclipse.html"> Eclipse</a> for an IDE using MinGW) </li> + + <li> + The <a href="http://sallyide.sourceforge.net/">Sally IDE</a> supports SmartWin++. + </li> + </UL> <UL> <b>Characteristics:</b> @@ -92,6 +97,7 @@ </P> <p>You may be looking at a local documentation copy, here is a link to the<a href="http://smartwinlib.org/doc/">Web based class documentation </a>. - </p> + </p> + </body> </html> |
|
From: andrew7 <bd...@us...> - 2006-12-10 22:39:31
|
Update of /cvsroot/smartwin/SmartWin/tests/WidgetTextBox In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv27214/tests/WidgetTextBox Modified Files: Main.cpp Log Message: Establish the title after the effect of the onUpdate handler. Index: Main.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/WidgetTextBox/Main.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- Main.cpp 7 Dec 2006 13:46:11 -0000 1.17 +++ Main.cpp 10 Dec 2006 22:39:25 -0000 1.18 @@ -93,7 +93,8 @@ //non - resizable window windowCS.style ^= WS_SIZEBOX; - windowCS.caption = _T( "WidgetTextBox compile and execute test" ); + SmartUtil::tstring title= "WidgetTextBox compile and execute test"; + windowCS.caption = _T( title ); windowCS.background = CreateSolidBrush( RGB( 0, 0, 125 ) ); windowCS.location = rect; createWindow( windowCS ); @@ -120,6 +121,8 @@ // Show how to append text textBoxs[0]->addText( _T(" added text") ); textBoxs[5]->addTextLines( _T("\nadded text") ); + + setText( title ); // Start with original title. } // Discard all chars except 0-9, '-' and '.' |
|
From: andrew7 <bd...@us...> - 2006-12-10 22:36:12
|
Update of /cvsroot/smartwin/SmartWin/include/io In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv25774/include/io Modified Files: InDialogClasses.h Log Message: Add directory and file functions Index: InDialogClasses.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/io/InDialogClasses.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- InDialogClasses.h 30 Nov 2006 00:36:49 -0000 1.6 +++ InDialogClasses.h 10 Dec 2006 22:36:05 -0000 1.7 @@ -95,6 +95,109 @@ itsFilterNo = inFilterNo; } + + // Static functions + //------------------------------------------------------------- + + // return c:\dir\subdir + // from c:\dir\subdir\file.ext + // + static SmartUtil::tstring pathOf( const SmartUtil::tstring & pathFile ) + { + size_t slashDex= pathFile.find_last_of('\\'); + if ( string::npos == slashDex ) { + + } + return pathFile.substr( 0, slashDex ); + } + + //------------------------------------------------------------- + + // return file.ext + // from c:\dir\subdir\file.ext + // + static SmartUtil::tstring fileOf( const SmartUtil::tstring & pathFile ) + { + size_t slashDex= pathFile.find_last_of('\\'); + if ( string::npos == slashDex ) { + + } + return pathFile.substr( ++slashDex ); + } + + + //------------------------------------------------------------- + + // return .ext + // from file.ext + // + static SmartUtil::tstring extensionOf( const SmartUtil::tstring & fileDotExtension ) + { + size_t dotDex= fileDotExtension.find_last_of('.'); + if ( string::npos == dotDex ) { + + } + return fileDotExtension.substr( dotDex ); + } + + + //------------------------------------------------------------- + + // return file + // from file.ext + // + static SmartUtil::tstring discardExtensionOf( const SmartUtil::tstring & fileDotExtension ) + { + size_t dotDex= fileDotExtension.find_last_of('.'); + if ( string::npos == dotDex ) { + + } + return fileDotExtension.substr( 0, dotDex ); + } + + //------------------------------------------------------------- + + /// copy a file from the source file to the destination file + // + static bool copyFile( const SmartUtil::tstring & source, + const SmartUtil::tstring & dest, + bool failIfExists = false ) + { + if ( ::CopyFile( source.c_str(), dest.c_str(), failIfExists ? TRUE : FALSE ) ) { + return true; + } else { + return false; + } + } + + //------------------------------------------------------------- + + static bool deleteFile( const SmartUtil::tstring & filePath ) + { + if ( ::DeleteFile( filePath.c_str() ) ) { + return true; + } else { + return false; + } + } + + //------------------------------------------------------------- + + static bool setFileAttributes( const SmartUtil::tstring & filePath, + DWORD attributes ) + { + if ( ::SetFileAttributes( filePath.c_str(), attributes ) ) { + return true; + } else { + return false; + } + } + + //------------------------------------------------------------- + + + // member variables + bool itsLoadFile; // True implies use of WidgetLoadFile, false implies WidgetSaveFile. bool itsRelative; unsigned itsFilterNo; @@ -139,6 +242,41 @@ } + // + // + bool dirExists() + { + DWORD retv= GetFileAttributes( itsDirPath.c_str() ); + if ( 0xffffffff != retv ) { + if ( FILE_ATTRIBUTE_DIRECTORY & retv ) return true; + } + return false; + } + + + // Create this directory + // Returns true if this directory was created + // + bool createDir() + { + if ( CreateDirectory( itsDirPath.c_str(), NULL ) ) { + return( true ); + } else { + return( false ); + } + } + + bool removeDirectory() + { + if ( RemoveDirectory( itsDirPath.c_str() ) ) { + return( true ); + } else { + return( false ); + } + } + + + // IN: A new directory for this class instance. // OUT: returns a vector of the parent and subdirectories of inDirPath // @@ -230,7 +368,8 @@ } - + // Generate the vector of subdirectories + // vector< SmartUtil::tstring > genSubDirectories() { vector< SmartUtil::tstring > subdirs; // Return value @@ -265,8 +404,9 @@ } - // + // Generate a vector of files that match a wildcard. // fullpath, if true, returns files as c:\dir\subdir\file.ext + // if false,returns files as file.ext // vector< SmartUtil::tstring > genFiles( bool fullPath= true, SmartUtil::tstring ext = _T("*") ) { @@ -304,6 +444,41 @@ } + // Static functions + + + //------------------------------------------------------------- + + static SmartUtil::tstring currentDir() + { + TCHAR cur_dir[MAX_PATH]; + GetCurrentDirectory( MAX_PATH, cur_dir ); + + return SmartUtil::tstring( cur_dir ); + } + + //------------------------------------------------------------- + + static bool setCurrentDirectory( const SmartUtil::tstring & pathFile ) + { + if ( SetCurrentDirectory( pathFile.c_str() ) ) + return true; + else + return false; + } + + + //------------------------------------------------------------- + + static SmartUtil::tstring getWindowsDirectory() + { + TCHAR winDir[MAX_PATH]; + if ( GetWindowsDirectory( winDir, MAX_PATH ) ) { + return SmartUtil::tstring( winDir ); + } + + return SmartUtil::tstring(); // Empty if err. + } |
|
From: andrew7 <bd...@us...> - 2006-12-10 22:33:28
|
Update of /cvsroot/smartwin/SmartWin/include/io In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21325/include/io Modified Files: iolib.h Log Message: put in namespace SmartWin Index: iolib.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/io/iolib.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- iolib.h 9 Oct 2006 01:11:05 -0000 1.11 +++ iolib.h 10 Dec 2006 22:24:50 -0000 1.12 @@ -42,6 +42,9 @@ //------------------------------------------------------------------------- +namespace SmartWin +{ + class iolib { public: @@ -375,4 +378,5 @@ //------------------------------------------------------------------------- }; +} #endif |
|
From: andrew7 <bd...@us...> - 2006-12-10 22:33:28
|
Update of /cvsroot/smartwin/SmartWin/include/io In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21207/include/io Modified Files: InDialog.h html_get.h html_put.h Log Message: Put in SmartWin:: Index: html_put.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/io/html_put.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- html_put.h 30 Nov 2006 00:32:51 -0000 1.10 +++ html_put.h 10 Dec 2006 22:24:08 -0000 1.11 @@ -46,6 +46,9 @@ using namespace SmartWin; using namespace std; +namespace SmartWin +{ + class html_put { private: @@ -279,4 +282,6 @@ //------------------------------------------------------------------------- }; +} + #endif Index: html_get.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/io/html_get.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- html_get.h 30 Nov 2006 00:32:51 -0000 1.11 +++ html_get.h 10 Dec 2006 22:24:08 -0000 1.12 @@ -50,6 +50,9 @@ //------------------------------------------------------------------------- +namespace SmartWin +{ + class html_get { private: @@ -535,4 +538,6 @@ } }; +} + #endif Index: InDialog.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/io/InDialog.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- InDialog.h 30 Nov 2006 00:32:51 -0000 1.12 +++ InDialog.h 10 Dec 2006 22:24:08 -0000 1.13 @@ -36,8 +36,11 @@ #include "boost/any.hpp" #include "InDialogClasses.h" +namespace SmartWin +{ + /// Provides a general purpose input modal dialog for numbers and strings. -/* An InDialog can accept pointers to a variety of types, and build a input dialog +/** An InDialog can accept pointers to a variety of types, and build a input dialog * for those variables. There can be one or many variables. * The pupose of this dialog is to satisfy the needs of many possible dialogs * with a general purpose dialog. @@ -93,6 +96,7 @@ * - has tab control between input fields. * */ + class InDialog : public WidgetFactory< WidgetModalDialog, InDialog, MessageMapPolicyModalDialogWidget > { @@ -139,10 +143,12 @@ * bool *, <br> * int *, float *, double *, <br> * SmartUtil::tstring * <br> - * SYSTEMTIME * <br> + * SYSTEMTIME * (Via a Calendar dialog)<br> + * COLORREF * (Via a color chooser dialog); * The specially defined types (See InDialogClasses.h) are: <br> * PasswordString *, FileString *, DirString *, BoundedLong *, ChoiceString * * + * The type passed in is the template TypeIn. * * The initial contents are displayed as a default, * and the input result is returned in the variable if the dialog is commited. @@ -518,7 +524,7 @@ filePath = dlg.showDialog(); } - if ( valptr->itsRelative ) ChangeAbsToRelative( filePath ); + // if ( valptr->itsRelative ) ChangeAbsToRelative( filePath ); itsBoxes[ itsIndicies[b] ]->setText( filePath ); return; } @@ -552,19 +558,6 @@ - - // A start at converting the absolute path to a relative path. - // unimplemented- - void ChangeAbsToRelative( SmartUtil::tstring filePath ) - { - TCHAR current[MAX_PATH + 1]; - - if ( GetCurrentDirectory( MAX_PATH, current ) ) - { - SmartUtil::tstring curPath( current ); - } - } - // Use the WidgetChooseColor to get a color, // Color the textbox, and store the color in itsColors void chooseColor( WidgetStaticPtr prompt ) @@ -946,4 +939,6 @@ Point itsExtraAroundText, itsBorder; }; +} + #endif |
|
From: andrew7 <bd...@us...> - 2006-12-10 19:37:10
|
Update of /cvsroot/smartwin/SmartWin/tests/Anchors In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv9208/tests/Anchors Modified Files: SWMainForm.cpp SWMainForm.h Log Message: Adjust to namespace SmartWin Index: SWMainForm.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/Anchors/SWMainForm.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- SWMainForm.cpp 30 Nov 2006 00:54:54 -0000 1.1 +++ SWMainForm.cpp 10 Dec 2006 19:37:05 -0000 1.2 @@ -39,9 +39,9 @@ void SWMainForm::PostConstructor() { // This is how you setup the widgets to be anchored. - manager.addAnchored( widgetDataGrid1, AnchoredItem::left | AnchoredItem::top | AnchoredItem::right ); - manager.addAnchored( widgetGroupBox1, AnchoredItem::box ); - manager.addAnchored( widgetButton1, AnchoredItem::dialog ); + manager.addAnchored( widgetDataGrid1, SmartWin::AnchoredItem::left | SmartWin::AnchoredItem::top | SmartWin::AnchoredItem::right ); + manager.addAnchored( widgetGroupBox1, SmartWin::AnchoredItem::box ); + manager.addAnchored( widgetButton1, SmartWin::AnchoredItem::dialog ); } void SWMainForm::OnSWMainFormSized(const sw::WidgetSizedEventResult& e) Index: SWMainForm.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/Anchors/SWMainForm.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- SWMainForm.h 30 Nov 2006 00:54:54 -0000 1.1 +++ SWMainForm.h 10 Dec 2006 19:37:05 -0000 1.2 @@ -35,7 +35,7 @@ WidgetComboBoxPtr widgetComboBox1; WidgetButtonPtr widgetButton1; // User Editable Block: Extra Variables Code (private IDE comment) - AnchorManager manager; + SmartWin::AnchorManager manager; // End User Editable Block: Extra Variables Code (private IDE comment) |
|
From: andrew7 <bd...@us...> - 2006-12-10 19:36:38
|
Update of /cvsroot/smartwin/SmartWin/include/smartwin In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv9046/include/smartwin Modified Files: Anchors.h Log Message: Put into namespace SmartWin and clean documentation Index: Anchors.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/Anchors.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Anchors.h 20 Nov 2006 03:45:45 -0000 1.1 +++ Anchors.h 10 Dec 2006 19:36:32 -0000 1.2 @@ -13,6 +13,13 @@ using std::vector; +namespace SmartWin +{ + +/// AnchoredItem defined the possible parameters for the addAnchored function. +/** Each value describes where the widget will be anchored. "top" for example + * indicated that the widget will always remain the same distance from its parent's top. +*/ struct AnchoredItem { enum {top=1, bottom=2, left=4, right=8}; // Attach to that side. enum { box = (top | bottom | left | right) }; // Attach to all sides; ie adjust to shape of parent. @@ -28,7 +35,7 @@ }; /// Anchor fixed sized widgets to the sides of their parent window. -/** +/** \ingroup WidgetLayout * A helper class to do some auto-resizings of widgets in SmartWin++. * * Take for example the common dialog Open File. @@ -36,18 +43,12 @@ * to the lower-right corner of the dialog. On the other hand, the control that lists all * the files in the current directory, grows or shrinks according to the size of the dialog. * -* That's what my class does. After widgets were created, you add them to a special list, +* That's what Anchors does. After the widgets were created, you add them to a special list, * and in the event handler of OnSize (of your WidgetWindow), you call a special method that * resizes all the widgets you've added before. * * Supposed to be simple. -* An example project (working with the Sally IDE & with a mingw32 makefile) is available online. -* -* (The anchors-sample.zip contains everything needed to compile, including the anchors source, and a compiled exe. -* -* http://t2.technion.ac.il/~scg/anchors-sample.zip -* http://t2.technion.ac.il/~scg/anchors-source.zip -* By: Carmi Grushko (venndigram) - 2006-10-02 20:38 +* Credit Carmi Grushko (venndigram) - 2006-10-02 20:38 * */ class AnchorManager { @@ -57,7 +58,8 @@ /** The addAnchored() function measures and stores the distances from the sides of * the widget's parent. It also stores the anchors bitmap which specifies which sides * of the parent should be used in resizing the widget later on. <br> - * IN: anchors: a combination of AnchoredItem::left, AnchoredItem::right, AnchoredItem::top, AnchoredItem::bottom + * IN: widget: Any widget that has already been sized and placed in its parent's window. <br> + * anchors: a combination of AnchoredItem::left, AnchoredItem::right, AnchoredItem::top, AnchoredItem::bottom <br> * Specifing "AnchoredItem::right" will ensure that the widget will always be the * same distance from its parent's right edge. Specifing "AnchoredItem::row" will cause the widget to go * from the left to the right side of the parent, keeping its original size. @@ -200,6 +202,19 @@ }; +/* +* An example project (working with the Sally IDE & with a mingw32 makefile) is available online. +* +* (The anchors-sample.zip contains everything needed to compile, including the anchors source, and a compiled exe. +* +* http://t2.technion.ac.il/~scg/anchors-sample.zip +* http://t2.technion.ac.il/~scg/anchors-source.zip +* By: Carmi Grushko (venndigram) - 2006-10-02 20:38 +*/ + +} + + #endif //region SallyIDE Text Editor Settings //Caret=(0,0) |
|
From: andrew7 <bd...@us...> - 2006-12-10 19:35:13
|
Update of /cvsroot/smartwin/SmartWin/include/smartwin/widgets In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8357/include/smartwin/widgets Modified Files: WidgetTextBox.h Log Message: Keep Dev-CPP happy on NULL vs 0 for non pointer Index: WidgetTextBox.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/widgets/WidgetTextBox.h,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- WidgetTextBox.h 8 Dec 2006 22:15:56 -0000 1.37 +++ WidgetTextBox.h 10 Dec 2006 19:35:08 -0000 1.38 @@ -493,7 +493,7 @@ template< class EventHandlerClass, class WidgetMessageMapType, class TextBoxType > DWORD WidgetTextBox< EventHandlerClass, WidgetMessageMapType, TextBoxType>::getTextLimit() const { - return static_cast< DWORD >( ::SendMessage( this->Widget::itsHandle, EM_GETLIMITTEXT , NULL, NULL ) ); + return static_cast< DWORD >( ::SendMessage( this->Widget::itsHandle, EM_GETLIMITTEXT , 0, 0 ) ); } |
|
From: Conrado P. <con...@us...> - 2006-12-09 22:06:17
|
Update of /cvsroot/smartwin/SmartWin/include/smartwin/widgets In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10726/include/smartwin/widgets Modified Files: WidgetMenu.h WidgetMenuExtended.h Log Message: Added getCount, isSystemMenu to WidgetMenu Added getCount, onPopup, removeAllItems, isSystemMenu to WidgetMenuExtended Index: WidgetMenuExtended.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/widgets/WidgetMenuExtended.h,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- WidgetMenuExtended.h 8 Dec 2006 22:15:55 -0000 1.44 +++ WidgetMenuExtended.h 9 Dec 2006 22:06:11 -0000 1.45 @@ -245,9 +245,9 @@ SmartUtil::tstring itemText ( buffer.begin(), buffer.begin() + count ); // now get text extents - SIZE textSize = - {0 - }; + SIZE textSize; + memset( & textSize, 0, sizeof( SIZE ) ); + HGDIOBJ oldFont = ::SelectObject( hdc, data->Font->getHandle() ); ::GetTextExtentPoint32( hdc, itemText.c_str(), ( int ) itemText.size(), & textSize ); ::SelectObject( hdc, oldFont ); @@ -307,9 +307,9 @@ if ( menu->drawSidebar ) { // get title text extents - SIZE textSize = - {0 - }; + SIZE textSize; + memset( & textSize, 0, sizeof( SIZE ) ); + ::GetTextExtentPoint32( hdc, menu->itsTitle.c_str(), ( int ) menu->itsTitle.size(), & textSize ); itemWidth += textSize.cy; @@ -425,9 +425,9 @@ titleFont = ::CreateFontIndirect( & lf ); // get title text size - SIZE textSize = - {0 - }; + SIZE textSize; + memset( & textSize, 0, sizeof( SIZE ) ); + HGDIOBJ oldFont = ::SelectObject( canvas.getDc(), titleFont ); ::GetTextExtentPoint32( canvas.getDc(), menu->itsTitle.c_str(), ( int ) menu->itsTitle.size(), & textSize ); ::SelectObject( canvas.getDc(), oldFont ); @@ -808,6 +808,39 @@ ); return handled; } + + static HRESULT dispatchPopup( private_::SignalContent & params ) + { + // get callback + typename WidgetType::voidPopupFunction func = + reinterpret_cast< typename WidgetType::voidPopupFunction >( params.Function ); + + StayAliveDeleter< WidgetType > deleter; + boost::shared_ptr< WidgetType > ptrThis( boost::polymorphic_cast< WidgetType * >( params.This ), deleter ); + + // call the callback + func + ( dynamic_cast< EventHandlerClass * >( params.This->getParent() ) + , ptrThis + ); + return 0; + } + + static HRESULT dispatchPopupThis( private_::SignalContent & params ) + { + // get method pointer + typename WidgetType::itsVoidPopupFunction func = + reinterpret_cast< typename WidgetType::itsVoidPopupFunction >( params.FunctionThis ); + + StayAliveDeleter< WidgetType > deleter; + boost::shared_ptr< WidgetType > ptrThis( boost::polymorphic_cast< WidgetType * >( params.This ), deleter ); + + // call method + ( ( * boost::polymorphic_cast< EventHandlerClass * >( params.This->getParent() ) ).*func ) + ( ptrThis + ); + return 0; + } }; // Menu Renderer static data members initialization @@ -965,6 +998,14 @@ /// Typedef of a static/global function taking a pointer to the original class, a pointer to the this Widget class and an unsigned int returning void typedef bool ( * boolMeasureItemFunction )( EventHandlerClass *, ObjectType, MEASUREITEMSTRUCT * ); + /// \ingroup eventsSignatures + /// \typedef Typedef of a member function to the original class taking pointer to the this Widget returning void + typedef void ( EventHandlerClass::* itsVoidPopupFunction )( ObjectType ); + + /// \ingroup eventsSignatures + /// Typedef of a static/global function taking a pointer to the original class, a pointer to the this Widget class returning void + typedef void ( * voidPopupFunction )( EventHandlerClass *, ObjectType ); + // Overriden to set default drawing void create( bool isPopup = false ); @@ -993,6 +1034,12 @@ void onMeasureItem( boolMeasureItemFunction eventHandler ); void onMeasureItem( itsBoolMeasureItemFunction eventHandler ); + /// Sets the event handler for the Popup event + void onPopup( voidPopupFunction eventHandler ); + + /// Sets the event handler for the Popup event + void onPopup( itsVoidPopupFunction eventHandler ); + /// Appends a separator item to the menu /** A menu separator is basically just "air" between menu items.< br > * A separator cannot be "clicked" or "chosen". @@ -1019,6 +1066,14 @@ */ void removeItem( unsigned itemIndex ); + /// Remove all items from the menu + /** Will also delete any submenus. + */ + void removeAllItems(); + + /// Return the number of items in the menu + int getCount(); + /// Displays and handles a menu which can appear anywhere in the window. /** Typically called by a Right Mouse click. If both the x and the y coordinate * is - 1 ( default ) it'll show the context menu on the position the mouse was @@ -1085,6 +1140,12 @@ /// Returns true if item is checked bool isItemChecked( unsigned itemID ); + /// Returns true if menu is "system menu" (icon in top left of window) + bool isSystemMenu() + { + return isSysMenu; + } + /// Returns item text SmartUtil::tstring getItemText( unsigned itemID ); @@ -1668,6 +1729,48 @@ } template< class EventHandlerClass, class MessageMapPolicy > +void WidgetMenuExtended< EventHandlerClass, MessageMapPolicy >::onPopup( voidPopupFunction eventHandler ) +{ + // get pointer to this message map + MessageMapType * This = boost::polymorphic_cast< MessageMapType * >( this ); + + // setup slot + This->addNewSignal + ( typename MessageMapType::SignalTupleType + ( private_::SignalContent + ( Message( WM_INITMENUPOPUP ) + , reinterpret_cast< private_::SignalContent::voidFunctionTakingVoid >( eventHandler ) + , This + ) + , typename MessageMapType::SignalType + ( typename MessageMapType::SignalType::SlotType( & Dispatcher::dispatchPopup ) + ) + ) + ); +} + +template< class EventHandlerClass, class MessageMapPolicy > +void WidgetMenuExtended< EventHandlerClass, MessageMapPolicy >::onPopup( itsVoidPopupFunction eventHandler ) +{ + // get pointer to this message map + MessageMapType * This = boost::polymorphic_cast< MessageMapType * >( this ); + + // setup slot + This->addNewSignal + ( typename MessageMapType::SignalTupleType + ( private_::SignalContent + ( Message( WM_INITMENUPOPUP ) + , reinterpret_cast< itsVoidFunction >( eventHandler ) + , This + ) + , typename MessageMapType::SignalType + ( typename MessageMapType::SignalType::SlotType( & Dispatcher::dispatchPopupThis ) + ) + ) + ); +} + +template< class EventHandlerClass, class MessageMapPolicy > void WidgetMenuExtended< EventHandlerClass, MessageMapPolicy >::appendSeparatorItem() { // init structure for new item @@ -1751,21 +1854,26 @@ { size_t i = 0; private_::ItemDataWrapper * wrapper = 0; + int itemRemoved = -1; for ( i = 0; i < itsItemDataRef.size(); ++i ) { // get current data wrapper wrapper = itsItemDataRef[i]; - if ( wrapper->index == itemIndex ) // if found + if ( wrapper->index == int(itemIndex) ) // if found { + itemRemoved = int(i); delete wrapper; itsItemDataRef[i] = 0; } - else if ( wrapper->index > itemIndex ) + else if ( wrapper->index > int(itemIndex) ) --wrapper->index; // adjust succeeding item indices } + if( itemRemoved != -1 ) + itsItemDataRef.erase( itsItemDataRef.begin() + itemRemoved ); + if ( popup != NULL ) // remove sub menus if any { for ( i = 0; i < itsChildrenRef.size(); ++i ) @@ -1780,6 +1888,26 @@ } template< class EventHandlerClass, class MessageMapPolicy > +void WidgetMenuExtended< EventHandlerClass, MessageMapPolicy >::removeAllItems() +{ + //must be backwards, since bigger indexes change on remove + for( int i = this->getCount() - 1; i >= 0; i-- ) + { + this->removeItem( i ); + } +} + +template< class EventHandlerClass, class MessageMapPolicy > +int WidgetMenuExtended< EventHandlerClass, MessageMapPolicy >::getCount() +{ + HMENU handle = reinterpret_cast< HMENU >( this->Widget::itsHandle ); + int count = ::GetMenuItemCount( handle ); + if( count == -1 ) + throw xCeption( _T( "Couldn't get item count in getCount()" ) ); + return count; +} + +template< class EventHandlerClass, class MessageMapPolicy > void WidgetMenuExtended< EventHandlerClass, MessageMapPolicy >::appendItem( unsigned itemID, const SmartUtil::tstring & text, MenuItemDataPtr itemData, Index: WidgetMenu.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/widgets/WidgetMenu.h,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- WidgetMenu.h 8 Dec 2006 22:15:55 -0000 1.31 +++ WidgetMenu.h 9 Dec 2006 22:06:11 -0000 1.32 @@ -433,6 +433,9 @@ */ bool getItemEnabled( unsigned id ); + /// Return the number of items in the menu + int getCount(); + /// Displays and handles a menu which can appear anywhere in the window. /** Typically called by a Right Mouse click. If both the x and the y coordinates * are - 1 ( default ), it'll show the context menu at the mouse position when @@ -464,6 +467,11 @@ */ unsigned trackPopupMenu( EventHandlerClass * mainWindow, int x = - 1, int y = - 1, unsigned flags = 0 ); + bool isSystemMenu() + { + return isSysMenu; + } + // We CAN'T have this one protected since boost needs to be able to destroy // objects of this type // TODO: Fix...!! @@ -600,9 +608,9 @@ template< class EventHandlerClass, class MessageMapPolicy > SmartUtil::tstring WidgetMenu< EventHandlerClass, MessageMapPolicy >::getText( unsigned id ) { - MENUITEMINFO mi = - {0 - }; + MENUITEMINFO mi; + memset( & mi, 0, sizeof( MENUITEMINFO ) ); + mi.cbSize = sizeof( MENUITEMINFO ); mi.fMask = MIIM_TYPE; if ( ::GetMenuItemInfo( reinterpret_cast< HMENU >( this->Widget::itsHandle ), id, FALSE, & mi ) == 0 ) @@ -673,6 +681,16 @@ } template< class EventHandlerClass, class MessageMapPolicy > +int WidgetMenu< EventHandlerClass, MessageMapPolicy >::getCount() +{ + HMENU handle = reinterpret_cast< HMENU >( this->Widget::itsHandle ); + int count = ::GetMenuItemCount( handle ); + if( count == -1 ) + throw xCeption( _T( "Couldn't get item count in getCount()" ) ); + return count; +} + +template< class EventHandlerClass, class MessageMapPolicy > unsigned WidgetMenu< EventHandlerClass, MessageMapPolicy >:: trackPopupMenu( EventHandlerClass * mainWindow, int x, int y, unsigned flags ) { |
|
From: Conrado P. <con...@us...> - 2006-12-09 22:06:17
|
Update of /cvsroot/smartwin/SmartWin/include/smartwin In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10726/include/smartwin Modified Files: MessageMap.h Log Message: Added getCount, isSystemMenu to WidgetMenu Added getCount, onPopup, removeAllItems, isSystemMenu to WidgetMenuExtended Index: MessageMap.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/MessageMap.h,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- MessageMap.h 10 Sep 2006 10:44:24 -0000 1.25 +++ MessageMap.h 9 Dec 2006 22:06:11 -0000 1.26 @@ -276,6 +276,7 @@ case WM_HSCROLL : case WM_VSCROLL : case WM_MEASUREITEM : + case WM_INITMENUPOPUP : { return mainWndRouteChild( hWnd, msg, wPar, lPar ); } @@ -292,7 +293,7 @@ virtual LRESULT mainWndRouteChild( HWND hWnd, UINT msg, WPARAM wPar, LPARAM lPar ) { // Checking to see if this is a message to a menu - if ( ( msg == WM_COMMAND && lPar == 0 && HIWORD( wPar ) == 0 ) || msg == WM_SYSCOMMAND ) + if ( ( msg == WM_COMMAND && lPar == 0 && HIWORD( wPar ) == 0 ) || msg == WM_SYSCOMMAND || msg == WM_INITMENUPOPUP ) { // We can have "user defined" sysmenu commands (by e.g. adding items to the sysmenu) but none will be // of higher or same value as SC_SIZE @@ -319,6 +320,12 @@ #endif ) { + if( msg == WM_INITMENUPOPUP && extPtr ) + { + HMENU handle = reinterpret_cast< HMENU >( extPtr->handle() ); + if( handle != (HMENU) wPar ) + continue; + } // function returns 1 of message was handled... // Need to iterate ALL menus until Event Handler is found... LRESULT retVal = ( * idx )->sendWidgetMessage( hWnd, msg, wPar, lPar ); |
|
From: Conrado P. <con...@us...> - 2006-12-09 22:06:17
|
Update of /cvsroot/smartwin/SmartWin/tests/WidgetMenu In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10726/tests/WidgetMenu Modified Files: Main.cpp Log Message: Added getCount, isSystemMenu to WidgetMenu Added getCount, onPopup, removeAllItems, isSystemMenu to WidgetMenuExtended Index: Main.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/WidgetMenu/Main.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- Main.cpp 8 Dec 2006 22:15:56 -0000 1.16 +++ Main.cpp 9 Dec 2006 22:06:11 -0000 1.17 @@ -22,6 +22,7 @@ WidgetMenuPtr recentFiles; WidgetMenuExtendedPtr extendedMenu; WidgetMenuExtendedPtr extendedFileMenu; + WidgetMenuExtendedPtr extendedRecentFiles; WidgetButtonPtr button; bool extendedMenuIsAttahced; // this will show if current menu is extended or no @@ -76,6 +77,21 @@ extendedMenuIsAttahced = !extendedMenuIsAttahced; } + void menuPoppedUp( WidgetMenuExtendedPtr menu ) + { + if( menu->isSystemMenu() ) + { + this->setText( _T( "System menu popped up!" ) ); + } + else if( menu == extendedRecentFiles ) + { + static MenuItemDataPtr data( new MenuItemData() ); + menu->removeAllItems(); + menu->appendItem( 101, _T("&1. file1.txt" ), data, & WidgetTest1::extendedMenuEventHandler ); + menu->appendItem( 102, _T("&2. file1.txt" ), data, & WidgetTest1::extendedMenuEventHandler ); + } + } + void initAndCreate() { WidgetWindow::Seed windowCS; @@ -113,6 +129,9 @@ file->appendItem( 7, _T( "&Don't forget to right click in the window" ), & WidgetTest1::menuEventHandler ); file->appendItem( 8, _T( "Text will be set later" ), & WidgetTest1::menuExitHandler ); file->setText( 8, _T( "Exit" ) ); + //compile tests + file->isSystemMenu(); + file->getCount(); // Creating extended menu extendedMenu = createExtendedMenu(); @@ -138,7 +157,8 @@ extendedFileMenu->appendItem( 12, _T( "&Save\tCtrl + S" ), saveData, & WidgetTest1::extendedMenuEventHandler ); // create extended recent files menu - WidgetMenuExtendedPtr extendedRecentFiles = extendedFileMenu->appendPopup( _T( "&Recent Files" ), data ); + extendedRecentFiles = extendedFileMenu->appendPopup( _T( "&Recent Files" ), data ); + extendedRecentFiles->onPopup( & WidgetTest1::menuPoppedUp ); MenuItemDataPtr disabledData( new MenuItemData() ); disabledData->Image = BitmapPtr( new Bitmap( _T( "images/delete.bmp" ) ) ); @@ -173,6 +193,7 @@ // set system menu sidebar sysMenu->setTitle( _T("SysMenu!"), true /* Draw as sidebar */ ); + sysMenu->onPopup( & WidgetTest1::menuPoppedUp ); // Attach to this widget extendedMenu->attach( this ); |
|
From: Conrado P. <con...@us...> - 2006-12-09 22:06:17
|
Update of /cvsroot/smartwin/SmartWin In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10726 Modified Files: changelog.txt Log Message: Added getCount, isSystemMenu to WidgetMenu Added getCount, onPopup, removeAllItems, isSystemMenu to WidgetMenuExtended Index: changelog.txt =================================================================== RCS file: /cvsroot/smartwin/SmartWin/changelog.txt,v retrieving revision 1.69 retrieving revision 1.70 diff -u -d -r1.69 -r1.70 --- changelog.txt 8 Dec 2006 22:15:55 -0000 1.69 +++ changelog.txt 9 Dec 2006 22:06:10 -0000 1.70 @@ -10,8 +10,10 @@ ******************************************************************************** Version 2.0.0, ?th of ? 2006 ******************************************************************************** -- Added setItemText to WidgetMenu and WidgetMenuExtended +- Added setText, getCount, isSystemMenu to WidgetMenu +- Added setItemText, getCount, onPopup, removeAllItems, isSystemMenu to + WidgetMenuExtended ******************************************************************************** |
|
From: Peter K. <syn...@us...> - 2006-12-09 17:11:51
|
Update of /cvsroot/smartwin/SmartWin/tests In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv9874 Modified Files: Makefile.mingw Log Message: add Graph example to the mingw clean process Index: Makefile.mingw =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/Makefile.mingw,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- Makefile.mingw 9 Dec 2006 17:08:39 -0000 1.11 +++ Makefile.mingw 9 Dec 2006 17:11:46 -0000 1.12 @@ -77,7 +77,7 @@ clean-sub-WidgetCheckBox \ clean-sub-WidgetComboBox \ clean-sub-WidgetDateTimePicker \ - clean-sub-WidgetWidgetGraph \ + clean-sub-WidgetGraph \ clean-sub-WidgetFun \ clean-sub-WidgetInherited \ clean-sub-WidgetList \ @@ -527,6 +527,12 @@ $(MAKE) -f $(MAKEFILE) clean @cd .. + +clean-sub-WidgetGraph : FORCE + cd WidgetGraph && \ + $(MAKE) -f $(MAKEFILE) clean + @cd .. + clean-sub-WidgetFun : FORCE cd WidgetFun && \ $(MAKE) -f $(MAKEFILE) clean |
|
From: Peter K. <syn...@us...> - 2006-12-09 17:08:49
|
Update of /cvsroot/smartwin/SmartWin/tests In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8307 Modified Files: Makefile.mingw Log Message: add Graph example to the mingw build process Index: Makefile.mingw =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/Makefile.mingw,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- Makefile.mingw 18 Apr 2006 12:57:11 -0000 1.10 +++ Makefile.mingw 9 Dec 2006 17:08:39 -0000 1.11 @@ -27,6 +27,7 @@ sub-WidgetComboBox \ sub-WidgetDateTimePicker \ sub-WidgetFun \ + sub-WidgetGraph \ sub-WidgetInherited \ sub-WidgetList \ sub-WidgetLoadFile \ @@ -76,6 +77,7 @@ clean-sub-WidgetCheckBox \ clean-sub-WidgetComboBox \ clean-sub-WidgetDateTimePicker \ + clean-sub-WidgetWidgetGraph \ clean-sub-WidgetFun \ clean-sub-WidgetInherited \ clean-sub-WidgetList \ @@ -240,6 +242,12 @@ $(MAKE) -f $(MAKEFILE) @cd .. +sub-WidgetGraph : FORCE + cd WidgetGraph && \ + $(COPY) ..\$(MAKEFILE).4all $(MAKEFILE) && \ + $(MAKE) -f $(MAKEFILE) + @cd .. + sub-WidgetInherited : FORCE cd WidgetInherited && \ $(COPY) ..\$(MAKEFILE).4all $(MAKEFILE) && \ |
|
From: Peter K. <syn...@us...> - 2006-12-09 16:54:53
|
Update of /cvsroot/smartwin/SmartWin/tests/WidgetGraph In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv1700 Modified Files: WidgetGraph.h Main.cpp Log Message: compile with gcc Index: Main.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/WidgetGraph/Main.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- Main.cpp 30 Nov 2006 01:05:08 -0000 1.10 +++ Main.cpp 9 Dec 2006 16:54:50 -0000 1.11 @@ -108,13 +108,13 @@ void initAndCreate() { - //typename WidgetFactory< sw::WidgetWindow, WidgetGraphTest< Numeric > >::Seed windowCS; - WidgetWindow::Seed windowCS; + typedef typename WidgetGraphTest<Numeric>::WidgetWindow WWType; + typename WWType::Seed windowCS; windowCS.location = SmartWin::Rectangle( 0, 0, 100, 100 ); windowCS.background = CreateSolidBrush( RGB( 0, 0, 125 ) ); windowCS.caption = _T( "Test" ); - this->createWindow( windowCS ); + this->WWType::createWindow( windowCS ); // Creating custom Widget itsGraph = new WidgetGraph< Numeric >( this ); @@ -128,6 +128,7 @@ layout(); onSized( & WidgetGraphTest::isResized ); + } void isResized( const WidgetSizedEventResult & sz ) Index: WidgetGraph.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/WidgetGraph/WidgetGraph.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- WidgetGraph.h 30 Nov 2006 01:05:08 -0000 1.8 +++ WidgetGraph.h 9 Dec 2006 16:54:50 -0000 1.9 @@ -29,7 +29,9 @@ void initAndCreate() { - WidgetWindow::Seed windowCS; + typedef typename WidgetGraph::WidgetWindow WWType; + + typename WWType::Seed windowCS; windowCS.exStyle = WS_EX_TOOLWINDOW; windowCS.style = WS_CHILD | WS_THICKFRAME | WS_CAPTION | WS_VISIBLE; |
|
From: Conrado P. <con...@us...> - 2006-12-08 22:16:02
|
Update of /cvsroot/smartwin/SmartWin/tests/WidgetMenu In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12251/tests/WidgetMenu Modified Files: Main.cpp Log Message: Added setText to WidgetMenu and setItemText WidgetMenuExtended Fixed some mingw issues with WidgetTextBox Index: Main.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/WidgetMenu/Main.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- Main.cpp 5 May 2006 17:21:46 -0000 1.15 +++ Main.cpp 8 Dec 2006 22:15:56 -0000 1.16 @@ -111,7 +111,8 @@ file->appendSeparatorItem(); file->appendCheckedItem( 6, _T( "&Check this..." ), & WidgetTest1::menuEventHandler ); file->appendItem( 7, _T( "&Don't forget to right click in the window" ), & WidgetTest1::menuEventHandler ); - file->appendItem( 8, _T( "Exit" ), & WidgetTest1::menuExitHandler ); + file->appendItem( 8, _T( "Text will be set later" ), & WidgetTest1::menuExitHandler ); + file->setText( 8, _T( "Exit" ) ); // Creating extended menu extendedMenu = createExtendedMenu(); @@ -141,8 +142,10 @@ MenuItemDataPtr disabledData( new MenuItemData() ); disabledData->Image = BitmapPtr( new Bitmap( _T( "images/delete.bmp" ) ) ); - extendedRecentFiles->appendItem( 13, _T( "No recent files" ), disabledData, & WidgetTest1::extendedMenuEventHandler ); - extendedRecentFiles->enableItem( 13, false ); + extendedRecentFiles->appendItem( 13, _T( "Text will be set later" ), disabledData, & WidgetTest1::extendedMenuEventHandler ); + extendedRecentFiles->enableItem( 13, true ); + SmartUtil::tstring txt = _T("No recent files..."); + extendedRecentFiles->setItemText( 13, txt.c_str() ); // add more items extendedFileMenu->appendSeparatorItem(); |
|
From: Conrado P. <con...@us...> - 2006-12-08 22:16:02
|
Update of /cvsroot/smartwin/SmartWin/include/smartwin/widgets In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12251/include/smartwin/widgets Modified Files: WidgetMenu.h WidgetMenuExtended.h WidgetTextBox.h Log Message: Added setText to WidgetMenu and setItemText WidgetMenuExtended Fixed some mingw issues with WidgetTextBox Index: WidgetMenuExtended.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/widgets/WidgetMenuExtended.h,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- WidgetMenuExtended.h 3 Nov 2006 13:30:21 -0000 1.43 +++ WidgetMenuExtended.h 8 Dec 2006 22:15:55 -0000 1.44 @@ -1088,6 +1088,9 @@ /// Returns item text SmartUtil::tstring getItemText( unsigned itemID ); + /// Sets item text + void setItemText( unsigned itemID, SmartUtil::tstring text ); + /// Sets color information for the menu /** The MenuColorInfo declares which colors will be used for drawing the menu ( * items ) <br> @@ -1494,6 +1497,21 @@ } template< class EventHandlerClass, class MessageMapPolicy > +void WidgetMenuExtended< EventHandlerClass, MessageMapPolicy >::setItemText( unsigned itemID, SmartUtil::tstring text ) +{ + MENUITEMINFO info; + memset( & info, 0, sizeof( MENUITEMINFO ) ); + info.cbSize = sizeof( MENUITEMINFO ); + + // set flag + info.fMask = MIIM_STRING; + info.dwTypeData = (TCHAR*) text.c_str(); + + if ( ::SetMenuItemInfo( reinterpret_cast< HMENU >( this->Widget::itsHandle ), itemID, FALSE, & info ) == FALSE ) + throw xCeption( _T( "Couldn't set item info in setItemText()" ) ); +} + +template< class EventHandlerClass, class MessageMapPolicy > void WidgetMenuExtended< EventHandlerClass, MessageMapPolicy >::setTitle( const SmartUtil::tstring & title, bool drawSidebar /* = false */) { this->drawSidebar = drawSidebar; Index: WidgetTextBox.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/widgets/WidgetTextBox.h,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- WidgetTextBox.h 7 Dec 2006 13:45:12 -0000 1.36 +++ WidgetTextBox.h 8 Dec 2006 22:15:56 -0000 1.37 @@ -364,7 +364,7 @@ template< class EventHandlerClass, class MessageMapPolicy, class TextBoxType > void WidgetTextBox< EventHandlerClass, MessageMapPolicy, TextBoxType >::addText( const SmartUtil::tstring & addtxt ) { - setSelection( ( long ) getText().size() ); + setSelection( ( long ) this->getText().size() ); replaceSelection( addtxt ); } @@ -372,8 +372,8 @@ template< class EventHandlerClass, class MessageMapPolicy, class TextBoxType > void WidgetTextBox< EventHandlerClass, MessageMapPolicy, TextBoxType >::addTextLines( const SmartUtil::tstring & addtxt ) { - setSelection( ( long ) getText().size() ); - replaceSelection( replaceEndlWithLfCr( addtxt ) ); + setSelection( ( long ) this->getText().size() ); + replaceSelection( this->replaceEndlWithLfCr( addtxt ) ); } Index: WidgetMenu.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/widgets/WidgetMenu.h,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- WidgetMenu.h 30 Nov 2006 00:42:36 -0000 1.30 +++ WidgetMenu.h 8 Dec 2006 22:15:55 -0000 1.31 @@ -400,6 +400,12 @@ */ SmartUtil::tstring getText( unsigned id ); + /// Sets the text of a specific menu item + /** Which menu item you wish to set the text is defined by the "id" + * parameter of the function. + */ + void setText( unsigned id, SmartUtil::tstring text ); + /// Checks (or uncheck) a specific menu item /** Which menu item you wish to check ( or uncheck ) is passed in as the "id" * parameter. <br> @@ -614,6 +620,21 @@ } template< class EventHandlerClass, class MessageMapPolicy > +void WidgetMenu< EventHandlerClass, MessageMapPolicy >::setText( unsigned id, SmartUtil::tstring text ) +{ + MENUITEMINFO info; + memset( & info, 0, sizeof( MENUITEMINFO ) ); + info.cbSize = sizeof( MENUITEMINFO ); + + // set flag + info.fMask = MIIM_STRING; + info.dwTypeData = (TCHAR*) text.c_str(); + + if ( ::SetMenuItemInfo( reinterpret_cast< HMENU >( this->Widget::itsHandle ), id, FALSE, & info ) == FALSE ) + throw xCeption( _T( "Couldn't set item info in setItemText()" ) ); +} + +template< class EventHandlerClass, class MessageMapPolicy > void WidgetMenu< EventHandlerClass, MessageMapPolicy >::checkItem( unsigned id, bool value ) { HMENU handle = reinterpret_cast< HMENU >( this->Widget::itsHandle ); |
|
From: Conrado P. <con...@us...> - 2006-12-08 22:16:01
|
Update of /cvsroot/smartwin/SmartWin In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12251 Modified Files: changelog.txt Log Message: Added setText to WidgetMenu and setItemText WidgetMenuExtended Fixed some mingw issues with WidgetTextBox Index: changelog.txt =================================================================== RCS file: /cvsroot/smartwin/SmartWin/changelog.txt,v retrieving revision 1.68 retrieving revision 1.69 diff -u -d -r1.68 -r1.69 --- changelog.txt 18 Aug 2006 19:12:11 -0000 1.68 +++ changelog.txt 8 Dec 2006 22:15:55 -0000 1.69 @@ -7,9 +7,15 @@ ******************************************************************************** +******************************************************************************** + Version 2.0.0, ?th of ? 2006 +******************************************************************************** +- Added setItemText to WidgetMenu and WidgetMenuExtended + + ******************************************************************************** - Version 2.0.0 RC1, 18th of August 2006 + Version 2.0.0 RC2, 20th of August 2006 ******************************************************************************** - Fixed lots of bugs in the WidgetModalDialog logic. You can now actually have an application consisting of only WidgetModalDialogs |
|
From: andrew7 <bd...@us...> - 2006-12-07 13:46:17
|
Update of /cvsroot/smartwin/SmartWin/tests/WidgetTextBox In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv23366/tests/WidgetTextBox Modified Files: Main.cpp Log Message: Demonstrate addText and addTextLines() functions. Index: Main.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/WidgetTextBox/Main.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- Main.cpp 30 Nov 2006 01:09:57 -0000 1.16 +++ Main.cpp 7 Dec 2006 13:46:11 -0000 1.17 @@ -116,6 +116,10 @@ SmartUtil::tstringstream ss; ss << _T("\"first\" << endl" << std::endl << "<< \"second\"" ); // textBoxs[5]->setText( ss.str() ); // setText does not handle endl. textBoxs[5]->setTextLines( ss.str() ); // setTextLines does. + + // Show how to append text + textBoxs[0]->addText( _T(" added text") ); + textBoxs[5]->addTextLines( _T("\nadded text") ); } // Discard all chars except 0-9, '-' and '.' |
|
From: andrew7 <bd...@us...> - 2006-12-07 13:45:16
|
Update of /cvsroot/smartwin/SmartWin/include/smartwin/widgets In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv22950/include/smartwin/widgets Modified Files: WidgetTextBox.h Log Message: Add addText and addTextLines functions Index: WidgetTextBox.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/widgets/WidgetTextBox.h,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- WidgetTextBox.h 30 Nov 2006 00:43:57 -0000 1.35 +++ WidgetTextBox.h 7 Dec 2006 13:45:12 -0000 1.36 @@ -164,6 +164,20 @@ */ SmartUtil::tstring getSelection() const; + + /// Appends text to the text box + /** The txt parameter is the new text to append to the text box. + */ + void addText( const SmartUtil::tstring & txt ); + + /// Appends the text in the text box so that endl causes a new line. + /** Just the same as addText except that CR are expanded to LF CR + * Replaces \n with \r\n so that Windows textbox understands "endl" + */ + void addTextLines( const SmartUtil::tstring & txt ); + + + /// Replaces the currently selected text in the text box with the given text parameter /** If canUndo is true this operation is stacked into the undo que ( can be * undone ), else this operation cannot be undone. <br> @@ -344,6 +358,26 @@ ::SendMessage( this->Widget::itsHandle, EM_REPLACESEL, static_cast< WPARAM >( canUndo ? TRUE : FALSE ), reinterpret_cast< LPARAM >( txt.c_str() ) ); } + + + +template< class EventHandlerClass, class MessageMapPolicy, class TextBoxType > +void WidgetTextBox< EventHandlerClass, MessageMapPolicy, TextBoxType >::addText( const SmartUtil::tstring & addtxt ) +{ + setSelection( ( long ) getText().size() ); + replaceSelection( addtxt ); +} + + +template< class EventHandlerClass, class MessageMapPolicy, class TextBoxType > +void WidgetTextBox< EventHandlerClass, MessageMapPolicy, TextBoxType >::addTextLines( const SmartUtil::tstring & addtxt ) +{ + setSelection( ( long ) getText().size() ); + replaceSelection( replaceEndlWithLfCr( addtxt ) ); +} + + + template< class EventHandlerClass, class MessageMapPolicy, class TextBoxType > long WidgetTextBox< EventHandlerClass, MessageMapPolicy, TextBoxType >::findText( const SmartUtil::tstring & txt, unsigned offset ) const { |