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: andrew7 <bd...@us...> - 2007-06-10 04:16:31
|
Update of /cvsroot/smartwin/SmartWin/tests/iolib In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv17851 Modified Files: iodemo.cpp Log Message: adjust for unicode Index: iodemo.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/iolib/iodemo.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- iodemo.cpp 30 Nov 2006 00:59:44 -0000 1.24 +++ iodemo.cpp 10 Jun 2007 04:16:28 -0000 1.25 @@ -325,9 +325,9 @@ { SmartUtil::tstring thost = itsHostname->getSelectedValue(); - string host= SmartUtil::UnicodeConverter<TCHAR,char>::doConvert( thost, SmartUtil::ConversionCodepage::UTF8 ); + // string host= SmartUtil::UnicodeConverter<TCHAR,char>::doConvert( thost, SmartUtil::ConversionCodepage::UTF8 ); - SmartNetwork::TcpTextStream tcp( host, "80", 30 ); // Port 80 for a HHTP web server. + SmartNetwork::TcpTextStream tcp( thost, _T("80"), 30 ); // Port 80 for a HHTP web server. itsHTTPGet->setText( thost + _T( " connected." ) ); SmartUtil::tstringstream ss; @@ -351,7 +351,7 @@ SmartUtil::tstring thost = itsHostname->getSelectedValue(); string host= SmartUtil::UnicodeConverter<TCHAR,char>::doConvert( thost, SmartUtil::ConversionCodepage::UTF8 ); - SmartNetwork::TcpTextStream tcp( host, "80", 30 ); // Port 80 for a HHTP web server. + SmartNetwork::TcpTextStream tcp( thost, _T("80"), 30 ); // Port 80 for a HHTP web server. tcp << itsHTTPGet->getText(); |
|
From: andrew7 <bd...@us...> - 2007-06-10 04:02:37
|
Update of /cvsroot/smartwin/SmartWin/SmartSOAP/SmartSOAP In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12059 Modified Files: SoapRequest.h Log Message: Unicode conversion Index: SoapRequest.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/SmartSOAP/SmartSOAP/SoapRequest.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- SoapRequest.h 5 May 2006 17:14:41 -0000 1.12 +++ SoapRequest.h 10 Jun 2007 04:02:33 -0000 1.13 @@ -67,7 +67,7 @@ * the deserialize function must parse the returned XML value from the SOAP response and return an object of type ReturnObject. * The timeout defines how long time the framework will wait after submitting the SOAP request for the response before raising an exception. */ - SoapRequest( const std::string & host, + SoapRequest( const SmartUtil::tstring & host, const SmartUtil::tstring & postUrl, const SmartUtil::tstring & soapAction, int port, @@ -75,7 +75,7 @@ const SendObject & sendObject, unsigned int timeout = 120 ); - SoapRequest( const std::string & connectionString, + SoapRequest( const SmartUtil::tstring & connectionString, const SmartUtil::tstring & soapAction, int port, Serializer serializer, @@ -92,14 +92,14 @@ // Implementation ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template< class Serializer, class SendObject, class ReturnObject > - SoapRequest< Serializer, SendObject, ReturnObject >::SoapRequest( const std::string & host, + SoapRequest< Serializer, SendObject, ReturnObject >::SoapRequest( const SmartUtil::tstring & host, const SmartUtil::tstring & postUrl, const SmartUtil::tstring & soapAction, int port, Serializer serializer, const SendObject & sendObject, unsigned int timeout ) - : itsHttpRequest( host, postUrl, _T( "text/xml; charset=utf-8" ), boost::lexical_cast< std::string >( port ), timeout ), + : itsHttpRequest( host, postUrl, _T( "text/xml; charset=utf-8" ), boost::lexical_cast< SmartUtil::tstring >( port ), timeout ), itsSerializer( serializer ), itsSendObject( sendObject ) { @@ -107,13 +107,13 @@ } template< class Serializer, class SendObject, class ReturnObject > - SoapRequest< Serializer, SendObject, ReturnObject >::SoapRequest( const std::string & connectionString, + SoapRequest< Serializer, SendObject, ReturnObject >::SoapRequest( const SmartUtil::tstring & connectionString, const SmartUtil::tstring & soapAction, int port, Serializer serializer, const SendObject & sendObject, unsigned int timeout ) - : itsHttpRequest( connectionString, _T( "text/xml; charset=utf-8" ), boost::lexical_cast< std::string >( port ), timeout ), + : itsHttpRequest( connectionString, _T( "text/xml; charset=utf-8" ), boost::lexical_cast< SmartUtil::tstring >( port ), timeout ), itsSerializer( serializer ), itsSendObject( sendObject ) { |
|
From: andrew7 <bd...@us...> - 2007-06-10 04:01:54
|
Update of /cvsroot/smartwin/SmartWin/tests/SmartSOAPGoogleAPITester In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv11669 Modified Files: MainWindow.h Log Message: Unicode conversion Index: MainWindow.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/SmartSOAPGoogleAPITester/MainWindow.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- MainWindow.h 3 Sep 2006 15:25:24 -0000 1.11 +++ MainWindow.h 10 Jun 2007 04:01:51 -0000 1.12 @@ -121,7 +121,7 @@ GoogleSerializer serializer; SmartSOAP::SoapRequest< GoogleSerializer, SendObject, ReturnObject > request( - "api.google.com", // Which host is our WebService located at + _T("api.google.com"), // Which host is our WebService located at _T( "/search/beta2" ), // What is the PATH to our WebService _T( "SOAPAction: \"urn:GoogleSearchAction\"" ), // What is the SOAPAction or basically the NAMESPACE of our WebService + the name of the function we're calling 80, // Which TCP/IP port is the WebService listening on @@ -167,6 +167,7 @@ box->setText( _T( "Type your search phrase here!" ) ); box->setFocus(); box->setSelection(); + //return true; } return false; } @@ -200,6 +201,7 @@ // Then creating the search textbox WidgetTextBox::Seed seed; + seed.style |= ES_MULTILINE | ES_WANTRETURN; seed.font = sw::createFont( _T( "Verdana" ), 15, 8 ); seed.caption = _T( "Type your search phrase here!" ); seed.location = sw::Rectangle( 5, cr.pos.y, cr.size.x - 10, 20 ); @@ -243,5 +245,27 @@ cr.size.y -= 10; rawResponse->setBounds( cr ); updateWidget(); + onSized( &MainWindow::isResized ); + } + + void isResized( const SmartWin::WidgetSizedEventResult & sz ) + { + layout(); // to reflect the change in window size by the user. + updateWidget(); + } + + void layout() + { + SmartWin::Rectangle r, cr( getClientAreaSize() ); + + cr.size.y += 28; + + // Then creating the search textbox + r= search->getBounds(); r.size.x= cr.size.x; search->setBounds( r ); + r= license->getBounds(); r.size.x= cr.size.x; license->setBounds( r ); + r= info->getBounds(); r.size.x= cr.size.x; info->setBounds( r ); + r= datagrid->getBounds(); r.size.x= cr.size.x; datagrid->setBounds( r ); + r= rawResponse->getBounds();r.size.x= cr.size.x; rawResponse->setBounds( r ); } + }; |
|
From: andrew7 <bd...@us...> - 2007-06-10 04:01:27
|
Update of /cvsroot/smartwin/SmartWin/tests/SmartSOAPWsdlParser In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv11641 Modified Files: Main.cpp Log Message: Unicode conversion Index: Main.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/SmartSOAPWsdlParser/Main.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Main.cpp 5 May 2006 17:21:44 -0000 1.4 +++ Main.cpp 10 Jun 2007 04:01:24 -0000 1.5 @@ -38,7 +38,8 @@ // Code file boost::tuples::tuple< SmartUtil::tstring, SmartUtil::tstring > retVal = WsdlParser::instance().fetchWsdlFromUrl( SmartUtil::Ascii2CurrentBuild::doConvert( wsdl, SmartUtil::ConversionCodepage::ANSI ) ); - std::string tmpOuput = retVal.get< 1 >(); + std::string tmpOuput = AsciiGuaranteed::doConvert( retVal.get< 1 >(), ConversionCodepage::ANSI ); + for ( std::string::iterator idx = tmpOuput.begin(); idx != tmpOuput.end(); ++idx ) @@ -52,7 +53,7 @@ code << tmpOuput; // Wsdl file - tmpOuput = retVal.get< 0 >(); + tmpOuput = AsciiGuaranteed::doConvert( retVal.get< 0 >(), ConversionCodepage::ANSI ); for ( std::string::iterator idx = tmpOuput.begin(); idx != tmpOuput.end(); ++idx ) |
|
From: andrew7 <bd...@us...> - 2007-06-10 04:00:59
|
Update of /cvsroot/smartwin/SmartWin/tests/SmartSOAPWsdlParser In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv11263 Modified Files: WsdlParser.h Log Message: Unicode conversion Index: WsdlParser.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/SmartSOAPWsdlParser/WsdlParser.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- WsdlParser.h 3 Sep 2006 15:25:24 -0000 1.4 +++ WsdlParser.h 10 Jun 2007 04:00:53 -0000 1.5 @@ -226,17 +226,17 @@ // Mandatory datamember... if ( !nativeType ) { - proxyClassesCppStream << _T( "\tSmartXML::XmlNode & " ) << variableName << _T( "Node = node.addChild( _T(\"" + variableName + "\"), _T(\"\"), _T(\"\") );" ) << _T( "\r\n" ); + proxyClassesCppStream << _T( "\tSmartXML::XmlNode & " ) << variableName << _T( "Node = node.addChild( _T(\"" << variableName << "\"), _T(\"\"), _T(\"\") );" ) << _T( "\r\n" ); proxyClassesCppStream << _T( "\t" ) << variableName << _T( ".serialize( " ) << variableName << _T( "Node );" ) << _T( "\r\n" ); } else { if ( typeName == _T( "SmartUtil::tstring" ) ) - proxyClassesCppStream << _T( "\tnode.addChild( _T(\"" + variableName + "\"), " + variableName + ", _T(\"\") );" ) << _T( "\r\n" ); + proxyClassesCppStream << _T( "\tnode.addChild( _T(\"" << variableName << "\"), " << variableName << ", _T(\"\") );" ) << _T( "\r\n" ); else if ( typeName == _T( "SmartUtil::DateTime" ) ) - proxyClassesCppStream << _T( "\tnode.addChild( _T(\"" + variableName + "\"), " + variableName + ".toString(), _T(\"\") );" ) << _T( "\r\n" ); + proxyClassesCppStream << _T( "\tnode.addChild( _T(\"" << variableName << "\"), " << variableName << ".toString(), _T(\"\") );" ) << _T( "\r\n" ); else - proxyClassesCppStream << _T( "\tnode.addChild( _T(\"" + variableName + "\"), boost::lexical_cast<SmartUtil::tstring>(" + variableName + "), _T(\"\") );" ) << _T( "\r\n" ); + proxyClassesCppStream << _T( "\tnode.addChild( _T(\"" << variableName << "\"), boost::lexical_cast<SmartUtil::tstring>(" << variableName << "), _T(\"\") );" ) << _T( "\r\n" ); } } else if ( minOccurs == _T( "0" ) && maxOccurs == _T( "1" ) ) @@ -244,19 +244,19 @@ // NOT a Mandatory datamember... proxyClassesCppStream << _T( "\tif( " ) << variableName << _T( ".get() != 0)" ) << _T( "\r\n" ); if ( typeName == _T( "SmartUtil::tstring" ) ) - proxyClassesCppStream << _T( "\t\tnode.addChild( _T(\"" + variableName + "\"), *" + variableName + ", _T(\"\") );" ) << _T( "\r\n" ); + proxyClassesCppStream << _T( "\t\tnode.addChild( _T(\"" << variableName << "\"), *" << variableName << ", _T(\"\") );" ) << _T( "\r\n" ); else if ( typeName == _T( "SmartUtil::DateTime" ) ) - proxyClassesCppStream << _T( "\t\tnode.addChild( _T(\"" + variableName + "\"), " + variableName + "->toString(), _T(\"\") );" ) << _T( "\r\n" ); + proxyClassesCppStream << _T( "\t\tnode.addChild( _T(\"" << variableName << "\"), " << variableName << "->toString(), _T(\"\") );" ) << _T( "\r\n" ); else { if ( !nativeType ) { - proxyClassesCppStream << _T( "\t{" ) << _T( "\r\n" ) << _T( "\t\tSmartXML::XmlNode & " ) << variableName << _T( "Node = node.addChild( _T(\"" + variableName + "\"), _T(\"\"), _T(\"\") );" ) << _T( "\r\n" ); + proxyClassesCppStream << _T( "\t{" ) << _T( "\r\n" ) << _T( "\t\tSmartXML::XmlNode & " ) << variableName << _T( "Node = node.addChild( _T(\"" << variableName << "\"), _T(\"\"), _T(\"\") );" ) << _T( "\r\n" ); proxyClassesCppStream << _T( "\t\t" ) << variableName << _T( "->serialize( " ) << variableName << _T( "Node );" ) << _T( "\r\n" ); proxyClassesCppStream << _T( "\t}" ) << _T( "\r\n" ); } else - proxyClassesCppStream << _T( "\t\tnode.addChild( _T(\"" + variableName + "\"), boost::lexical_cast<SmartUtil::tstring>(*" + variableName + "), _T(\"\") );" ) << _T( "\r\n" ); + proxyClassesCppStream << _T( "\t\tnode.addChild( _T(\"" << variableName << "\"), boost::lexical_cast<SmartUtil::tstring>(*" << variableName << "), _T(\"\") );" ) << _T( "\r\n" ); } } else if ( minOccurs == _T( "0" ) && maxOccurs == _T( "unbounded" ) ) @@ -278,16 +278,16 @@ if ( typeName == _T( "SmartUtil::tstring" ) ) { if ( nillable ) - proxyClassesCppStream << _T( "\t\tnode.addChild( _T(\"" + variableName + "\"), **idx, _T(\"\") );" ) << _T( "\r\n" ); + proxyClassesCppStream << _T( "\t\tnode.addChild( _T(\"" << variableName << "\"), **idx, _T(\"\") );" ) << _T( "\r\n" ); else - proxyClassesCppStream << _T( "\t\tnode.addChild( _T(\"" + variableName + "\"), *idx, _T(\"\") );" ) << _T( "\r\n" ); + proxyClassesCppStream << _T( "\t\tnode.addChild( _T(\"" << variableName << "\"), *idx, _T(\"\") );" ) << _T( "\r\n" ); } else if ( typeName == _T( "SmartUtil::DateTime" ) ) { if ( nillable ) - proxyClassesCppStream << _T( "\t\tnode.addChild( _T(\"" + variableName + "\"), (*idx)->toString(), _T(\"\") );" ) << _T( "\r\n" ); + proxyClassesCppStream << _T( "\t\tnode.addChild( _T(\"" << variableName << "\"), (*idx)->toString(), _T(\"\") );" ) << _T( "\r\n" ); else - proxyClassesCppStream << _T( "\t\tnode.addChild( _T(\"" + variableName + "\"), idx->toString(), _T(\"\") );" ) << _T( "\r\n" ); + proxyClassesCppStream << _T( "\t\tnode.addChild( _T(\"" << variableName << "\"), idx->toString(), _T(\"\") );" ) << _T( "\r\n" ); } else { @@ -295,21 +295,21 @@ { if ( nillable ) { - proxyClassesCppStream << _T( "\t\tSmartXML::XmlNode & " ) << variableName << _T( "Node = node.addChild( _T(\"" + variableName + "\"), _T(\"\"), _T(\"\") );" ) << _T( "\r\n" ); + proxyClassesCppStream << _T( "\t\tSmartXML::XmlNode & " ) << variableName << _T( "Node = node.addChild( _T(\"" << variableName << "\"), _T(\"\"), _T(\"\") );" ) << _T( "\r\n" ); proxyClassesCppStream << _T( "\t\t(*idx)->serialize( " ) << variableName << _T( "Node );" ) << _T( "\r\n" ); } else { - proxyClassesCppStream << _T( "\t\tSmartXML::XmlNode & " ) << variableName << _T( "Node = node.addChild( _T(\"" + variableName + "\"), _T(\"\"), _T(\"\") );" ) << _T( "\r\n" ); + proxyClassesCppStream << _T( "\t\tSmartXML::XmlNode & " ) << variableName << _T( "Node = node.addChild( _T(\"" << variableName << "\"), _T(\"\"), _T(\"\") );" ) << _T( "\r\n" ); proxyClassesCppStream << _T( "\t\tidx->serialize( " ) << variableName << _T( "Node );" ) << _T( "\r\n" ); } } else { if ( nillable ) - proxyClassesCppStream << _T( "\t\tnode.addChild( _T(\"" + variableName + "\"), boost::lexical_cast<SmartUtil::tstring>(**idx), _T(\"\") );" ) << _T( "\r\n" ); + proxyClassesCppStream << _T( "\t\tnode.addChild( _T(\"" << variableName << "\"), boost::lexical_cast<SmartUtil::tstring>(**idx), _T(\"\") );" ) << _T( "\r\n" ); else - proxyClassesCppStream << _T( "\t\tnode.addChild( _T(\"" + variableName + "\"), boost::lexical_cast<SmartUtil::tstring>(*idx), _T(\"\") );" ) << _T( "\r\n" ); + proxyClassesCppStream << _T( "\t\tnode.addChild( _T(\"" << variableName << "\"), boost::lexical_cast<SmartUtil::tstring>(*idx), _T(\"\") );" ) << _T( "\r\n" ); } } proxyClassesCppStream << _T( "\t}" ) << _T( "\r\n" ); @@ -566,8 +566,8 @@ proxyClassesStream << _T( "\t\t\trootNode.addNamespace( SmartXML::XmlNamespace( _T( \"http://www.w3.org/2001/XMLSchema\"), _T(\"xsd\") ) );") << _T("\r\n"); proxyClassesStream << _T( "\t\t\trootNode.addNamespace( SmartXML::XmlNamespace( _T( \"http://schemas.xmlsoap.org/soap/envelope/\"), _T(\"soap\") ) );") << _T("\r\n"); proxyClassesStream << _T( "\t\t\tSmartXML::XmlNode & bodyNode = rootNode.addChild( _T(\"Body\"), _T(\"\"), _T(\"soap\") );" ) << _T( "\r\n" ); - proxyClassesStream << _T( "\t\t\tSmartXML::XmlNode & functionNameNode = bodyNode.addChild( _T(\"" + name + "\"), _T(\"\"), _T(\"\") );" ) << _T( "\r\n" ); - proxyClassesStream << _T( "\t\t\tfunctionNameNode.addNamespace( SmartXML::XmlNamespace( _T(\"" + docNode->findAttribute( _T( "targetNamespace" ) ) + "\") ) );" ) << _T( "\r\n" ); + proxyClassesStream << _T( "\t\t\tSmartXML::XmlNode & functionNameNode = bodyNode.addChild( _T(\"" << name << "\"), _T(\"\"), _T(\"\") );" ) << _T( "\r\n" ); + proxyClassesStream << _T( "\t\t\tfunctionNameNode.addNamespace( SmartXML::XmlNamespace( _T(\"" << docNode->findAttribute( _T( "targetNamespace" ) ) << "\") ) );" ) << _T( "\r\n" ); proxyClassesStream << _T( "\t\t\tinput.serialize(functionNameNode);" ) << _T( "\r\n" ); proxyClassesStream << _T( "\t\t\treturn doc.toString();" ) << _T( "\r\n" ); |
|
From: andrew7 <bd...@us...> - 2007-06-10 03:59:27
|
Update of /cvsroot/smartwin/SmartWin/tests/swDll In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10827 Modified Files: ResourceDialogClass.h helloDll.h swDll.cpp swDllswMain.cpp Log Message: Adjustment for unicode and mbs operation Index: swDllswMain.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/swDll/swDllswMain.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- swDllswMain.cpp 19 Feb 2007 02:24:03 -0000 1.1 +++ swDllswMain.cpp 10 Jun 2007 03:59:24 -0000 1.2 @@ -34,7 +34,8 @@ // Dll gets values with a GUI. if ( guiGetNumberAndString( & numb, ( char * ) & str ) ) { - createMessageBox().show( _T( "Hello !" ), str ); + createMessageBox().show( _T( "Hello !" ), + SmartUtil::Ascii2CurrentBuild::doConvert( str, SmartUtil::ConversionCodepage::ANSI ) ); } } @@ -52,7 +53,8 @@ // Same thing but this time the DLL does it with a dialog. if ( dialogGetNumberAndString( & numb, ( char * ) & str ) ) { - createMessageBox().show( _T( "Hello !" ), str ); + createMessageBox().show( _T( "Hello !" ), + SmartUtil::Ascii2CurrentBuild::doConvert( str, SmartUtil::ConversionCodepage::ANSI ) ); } } Index: ResourceDialogClass.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/swDll/ResourceDialogClass.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ResourceDialogClass.h 19 Feb 2007 02:24:02 -0000 1.1 +++ ResourceDialogClass.h 10 Jun 2007 03:59:24 -0000 1.2 @@ -42,10 +42,9 @@ btnOk->onClicked( & ResourceDialogClass::OkClicked ); } catch ( xCeption x ) { - SmartUtil::tstring errmsg( x.whatWndMsg() ); - errmsg += _T(" from "); - errmsg += x.what(); - createMessageBox().show( errmsg ); + std::stringstream ss; + ss << x.whatWndMsg() << " from " << x.what(); + createMessageBox().show( SmartUtil::Ascii2CurrentBuild::doConvert( ss.str(), SmartUtil::ConversionCodepage::UTF8 ) ); } } @@ -62,7 +61,8 @@ bool closing() { - strcpy( itsOutStrPtr, itsHexTxt->getText().c_str() ); + std::string s = SmartUtil::AsciiGuaranteed::doConvert( itsHexTxt->getText(), SmartUtil::ConversionCodepage::ANSI ); + strcpy( itsOutStrPtr, s.c_str() ); return true; } Index: helloDll.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/swDll/helloDll.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- helloDll.h 5 May 2006 17:14:40 -0000 1.3 +++ helloDll.h 10 Jun 2007 03:59:24 -0000 1.4 @@ -29,12 +29,12 @@ PasswordString pass1; // or ( 8, "" ) bool bool1 = true; - ChoiceString cs( "scissors|rock|paper", 2 ); + ChoiceString cs( _T("scissors|rock|paper"), 2 ); - FileString loadFs( "C:\\path\\gumbo.txt" ); - loadFs.addFilter( "JPG files", "*.jpg" ); - FileString saveFs( "", false ); - saveFs.addFilter( "JPG files", "*.jpg" ); + FileString loadFs( _T("C:\\path\\gumbo.txt") ); + loadFs.addFilter( _T("JPG files"), _T("*.jpg") ); + FileString saveFs( _T(""), false ); + saveFs.addFilter( _T("JPG files"), _T("*.jpg") ); SYSTEMTIME bookDue; ::GetSystemTime( & bookDue ); @@ -43,7 +43,7 @@ bool c; - InDialog myInDialog( this, "First InDialog Attempt !" ); + InDialog myInDialog( this, _T("First InDialog Attempt !") ); if ( IDCANCEL == myInDialog .add( _T( "Input file ..." ), & loadFs ) .add( _T( "Output file ..." ), & saveFs ) @@ -87,7 +87,7 @@ createWindow(); setText( _T( "Hello SmartWin" ) ); // Title itsInteger = - 8; - itsString = "hello via SmartWin++ window"; + itsString = _T("hello via SmartWin++ window"); SmartWin::Rectangle desktop( getDesktopSize() ); setBounds( desktop.top( 0.2 ).left( 0.3 ) ); @@ -120,7 +120,8 @@ bool isClosing() { * outIntPtr = itsInteger; - strcpy( outStrPtr, itsString.c_str() ); + std::string s = SmartUtil::AsciiGuaranteed::doConvert( itsString, SmartUtil::ConversionCodepage::ANSI ); + strcpy( outStrPtr, s.c_str() ); return true; } Index: swDll.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/swDll/swDll.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- swDll.cpp 7 Jan 2007 18:43:05 -0000 1.5 +++ swDll.cpp 10 Jun 2007 03:59:24 -0000 1.6 @@ -48,8 +48,7 @@ bool getNumberAndString( int * numb, char str[] ) { * numb = 23; - SmartUtil::tstring tstr = "hello world from a DLL"; - strcpy( str, tstr.c_str() ); + strcpy( str, "hello world from a DLL" ); return true; } |
|
From: andrew7 <bd...@us...> - 2007-06-10 03:58:03
|
Update of /cvsroot/smartwin/SmartWin/tests/WidgetTextBox In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10084 Modified Files: Main.cpp Log Message: Fix bug so it works on unicode and mbs. Index: Main.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/WidgetTextBox/Main.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- Main.cpp 10 Dec 2006 22:39:25 -0000 1.18 +++ Main.cpp 10 Jun 2007 03:58:00 -0000 1.19 @@ -93,8 +93,8 @@ //non - resizable window windowCS.style ^= WS_SIZEBOX; - SmartUtil::tstring title= "WidgetTextBox compile and execute test"; - windowCS.caption = _T( title ); + SmartUtil::tstring title= _T("WidgetTextBox compile and execute test"); + windowCS.caption = title; windowCS.background = CreateSolidBrush( RGB( 0, 0, 125 ) ); windowCS.location = rect; createWindow( windowCS ); |
|
From: andrew7 <bd...@us...> - 2007-06-09 19:32:06
|
Update of /cvsroot/smartwin/SmartWin/tests/NotePad In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv16455 Modified Files: MainWindow.cpp Log Message: Add test of setTextLimit, the way to limit the size of text that goes in a window. Index: MainWindow.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/NotePad/MainWindow.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- MainWindow.cpp 5 May 2006 17:21:44 -0000 1.16 +++ MainWindow.cpp 9 Jun 2007 19:32:03 -0000 1.17 @@ -173,6 +173,7 @@ textBoxCS.exStyle = WS_EX_CLIENTEDGE; textBoxCS.font = sw::createFont( _T( "Courier New" ), 16, 0, 1, ANSI_CHARSET, false, false, false, 0, OUT_DEFAULT_PRECIS ); itsTextField = createTextBox( textBoxCS ); + itsTextField->setTextLimit( 100000 ); // Allow large files to be edited. itsTextField->setScrollBarHorizontally(); itsTextField->setScrollBarVertically(); |
|
From: andrew7 <bd...@us...> - 2007-06-09 19:30:32
|
Update of /cvsroot/smartwin/SmartWin/tests/NotePad In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv15859 Modified Files: Main.cpp Log Message: Add test of command line parameter functions Index: Main.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/NotePad/Main.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Main.cpp 5 May 2006 17:21:44 -0000 1.3 +++ Main.cpp 9 Jun 2007 19:30:28 -0000 1.4 @@ -10,6 +10,9 @@ int SmartWinMain( SmartWin::Application & app ) { + std::vector<std::string> params = app.getCommandLine().getParams(); + const char * rawParams = app.getCommandLine().getParamsRaw(); + new MainWindow(); return app.run(); } |
|
From: andrew7 <bd...@us...> - 2007-06-09 19:28:48
|
Update of /cvsroot/smartwin/SmartWin/source In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv15003 Modified Files: Widget.cpp Log Message: Add comment qwarning about the dangers of mixing mbs with unicode Index: Widget.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/source/Widget.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Widget.cpp 11 Jul 2006 00:07:38 -0000 1.14 +++ Widget.cpp 9 Jun 2007 19:28:45 -0000 1.15 @@ -118,6 +118,7 @@ if ( !itsHandle ) { // The most common error is to forget WS_CHILD in the styles + // Also, don't mix unicode applications with multibyte smartwin libs. ERROR_CANNOT_FIND_WND_CLASS 1407 xCeption x( _T( "CreateWindowEx in Widget::create fizzled ..." ) ); throw x; } |
|
From: andrew7 <bd...@us...> - 2007-06-09 19:27:32
|
Update of /cvsroot/smartwin/SmartWin/source In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv14577 Modified Files: Application.cpp Log Message: Add dump of windows error code after exception Index: Application.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/source/Application.cpp,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- Application.cpp 18 Feb 2007 00:40:54 -0000 1.45 +++ Application.cpp 9 Jun 2007 19:27:29 -0000 1.46 @@ -161,6 +161,7 @@ _RPT0( _CRT_WARN, "\r\n" ); if ( ! corruptMemMemLeak ) { + _RPT1( _CRT_WARN, "%d :", err.getErrorCode() ); _RPT0( _CRT_WARN, err.whatWndMsg() ); _RPT0( _CRT_WARN, "\r\n" ); } |
|
From: andrew7 <bd...@us...> - 2007-06-09 17:14:53
|
Update of /cvsroot/smartwin/SmartWin/include/smartwin In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28172 Modified Files: Place.h Log Message: Added sizeForRemainingRow function Index: Place.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/Place.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- Place.h 18 Feb 2007 00:55:44 -0000 1.9 +++ Place.h 9 Jun 2007 17:14:50 -0000 1.10 @@ -212,6 +212,23 @@ obj.size.y = itsLowRight.y - ( itsPos.y + itsBorder.y ); } + /// Set obj.pos and obj.size to fill the rest of this row. + /** Set obj.pos and obj.size to fill the rest of this row. The object needs to + * be positioned at the current position, and sized to take all the remaining + * space in the row. + */ + void sizeForRemainingRow( struct Rectangle & obj ) + { + newRowIfNeeded( obj ); + + obj.pos = itsPos; // Return current position + obj.size.x = itsLowRight.x - ( itsPos.x + itsBorder.x ); + obj.size.y = itsMaxYInLine; + itsPos.x += obj.size.x + itsBorder.x; // Update next position. + } + + + /// Considering the whole area to be divided into rows and columns, /// calculate the size of one cell. /** Calculate the size of one cell of the bounds. <br> |
|
From: andrew7 <bd...@us...> - 2007-06-09 17:13:35
|
Update of /cvsroot/smartwin/SmartWin/include/io In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28124 Modified Files: iolib.h Log Message: Added the utility fileToVect( const SmartUtil::tstring & filePath, vector<unsigned char> & dat ) Index: iolib.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/io/iolib.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- iolib.h 18 Feb 2007 00:47:16 -0000 1.13 +++ iolib.h 9 Jun 2007 17:13:32 -0000 1.14 @@ -195,6 +195,27 @@ return( true ); } +//------------------------------------------------------------------------- + + +static bool fileToVect( const SmartUtil::tstring & filePath, vector<unsigned char> & dat ) +{ + dat.clear(); + if ( 0 == filePath.size() != 0 ) return( false ); + + + basic_ifstream< TCHAR > file( SmartUtil::AsciiGuaranteed::doConvert( filePath.c_str(), + SmartUtil::ConversionCodepage::UTF8 ).c_str(), + ios_base::binary ); + if ( ! file.good() ) return( false ); + + do { + dat.push_back( file.get() ); + } while ( file.good() ); + + return( true ); +} + //------------------------------------------------------------------------- |
|
From: andrew7 <bd...@us...> - 2007-06-09 17:12:32
|
Update of /cvsroot/smartwin/SmartWin/include/io In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv27718 Modified Files: InDialog.h Log Message: Added alternate constructor InDialog( SmartUtil::tstring inTitle ) which allows InDialog to exist standalone. Index: InDialog.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/io/InDialog.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- InDialog.h 10 Dec 2006 22:24:08 -0000 1.13 +++ InDialog.h 9 Jun 2007 17:12:29 -0000 1.14 @@ -121,6 +121,18 @@ setFont = true; } + /// Constructor InDialog( "Title" ) uses a default font. + /// and can exist outside of awidget derived class. + InDialog( SmartUtil::tstring inTitle ) + : Widget( NULL ), + itsTitle( inTitle ) + { + onInitDialog( & InDialog::initDialog ); // Mandatory + setFont = false; + } + + + /// prepare the dialog with same title to be used again. void clear() { |
|
From: andrew7 <bd...@us...> - 2007-06-09 17:10:06
|
Update of /cvsroot/smartwin/SmartWin/doxygenIn/html In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv26513 Modified Files: guide.html Log Message: Add links to linux and wince Index: guide.html =================================================================== RCS file: /cvsroot/smartwin/SmartWin/doxygenIn/html/guide.html,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- guide.html 10 Dec 2006 22:44:08 -0000 1.11 +++ guide.html 9 Jun 2007 17:10:01 -0000 1.12 @@ -30,9 +30,9 @@ <li> Windows <LI> - Windows CE + Windows CE (see <a href="wince.html">Wince.html</a> <li> - Linux via the WineLib.</li></UL> + Linux via the WineLib. (see <a href="linuxwine.html">Linuxwine.html</a> </li></UL> <UL> <b>Tested Compilers:</b> <li> |
|
From: andrew7 <bd...@us...> - 2007-06-09 17:09:27
|
Update of /cvsroot/smartwin/SmartWin/doxygenIn/html In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv26487 Added Files: wince.html Log Message: First attempt at some infor for windows CE. More is needed ! --- NEW FILE: wince.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Running SmartWin++ Programs on Windows CE</title> </head> <body> <h2>Windows CE </h2> <P> There is a Visual Studio solution called SmartWinDevices which can be used to build Smartwin. You should adjust the platform to suit your target system. </P> <P> Under test\PocketPC\SmartWinDevices, There is a Visual Studio solution called SmartWinDevices that can be used to try a few of the standard smartwin tests. </P> <H3> Compile time issues </H3> <P> interlocked.hpp needed some #ifndef WINCE to get things to compile. Perhaps a Boost upgrade issue ? </P> <pre> #ifndef WINCE extern "C" long __cdecl _InterlockedIncrement( long volatile * ); extern "C" long __cdecl _InterlockedDecrement( long volatile * ); #endif </pre> <H3> Link time issues </H3> <P> CVTRES : fatal error CVT1109: target machine 'THUMB' requires '/WINDOWSCE <br></br> was fixed by placing /subsystem:windowsce,4.20 /machine:ARM /ARMPADCODE in the linker additional options </P> </p> <H3> Runtime issues. </H3> <P> Menus ? </P> </body> </html> |
|
From: andrew7 <bd...@us...> - 2007-06-09 16:23:06
|
Update of /cvsroot/smartwin/SmartWin/tests/WidgetLoadFile In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7752 Modified Files: Main.cpp Log Message: Test for default filepath option Index: Main.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/WidgetLoadFile/Main.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Main.cpp 9 Jul 2006 03:42:01 -0000 1.6 +++ Main.cpp 9 Jun 2007 16:22:57 -0000 1.7 @@ -43,6 +43,12 @@ WidgetMessageBox msgBox = createMessageBox(); msgBox.show( filePath ); + // Choose an existing file with a default file + filePath = dlg.showDialog( _T("Main.cpp") ); + msgBox.show( filePath ); + + + // Choose multiple files std::vector<SmartUtil::tstring> filePathList = dlg.showDialogMultiSelect(); filePath = _T(""); std::vector<SmartUtil::tstring>::iterator iter; |
|
From: andrew7 <bd...@us...> - 2007-06-09 16:21:45
|
Update of /cvsroot/smartwin/SmartWin/include/smartwin/widgets In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7301 Modified Files: WidgetLoadFile.h Log Message: Add showDialog( SmartUtil::tstring defaultFilePath ) to allow prechoosen file as the default. Index: WidgetLoadFile.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/widgets/WidgetLoadFile.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- WidgetLoadFile.h 30 Nov 2006 00:43:57 -0000 1.15 +++ WidgetLoadFile.h 9 Jun 2007 16:21:39 -0000 1.16 @@ -81,6 +81,18 @@ */ SmartUtil::tstring showDialog(); + /// Shows the dialog with a default file path preselected. + /** Returns string() or "empty string" if user press cancel. <br> + * Returns a "file path" if user presses ok. <br> + * Use the inherited functions AspectFileFilter::addFilter and + * AspectFileFilter::activeFilter <br> + * before calling this function, if you wish the dialog to show only certain + * types of files. + */ + SmartUtil::tstring showDialog( SmartUtil::tstring defaultFilePath ); + + + /// Shows the dialog /** Returns an empty vector if user press cancel. <br> * Returns a vector of "file paths" if user presses ok. <br> @@ -132,6 +144,34 @@ return retVal; } + +template< class Parent > +SmartUtil::tstring WidgetLoadFile< Parent >::showDialog( SmartUtil::tstring defaultFilePath ) +{ + TCHAR szFile[PATH_BUFFER_SIZE]; // buffer for file name +#ifndef _tcscpy_s + _tcsncpy( szFile, defaultFilePath.c_str(), PATH_BUFFER_SIZE ); +#else + _tcscpy_s( szFile, PATH_BUFFER_SIZE, defaultFilePath.c_str() ); +#endif + + + OPENFILENAME ofn; // common dialog box structure + fillOutCommonStructure( ofn, itsParent->handle(), OFN_FILEMUSTEXIST ); + ofn.lpstrFile = szFile; + ofn.Flags |= OFN_FILEMUSTEXIST; + + SmartUtil::tstring retVal; + if ( ::GetOpenFileName( & ofn ) ) + { + retVal = ofn.lpstrFile; + backslashToForwardSlashForUnix( retVal ); + } + return retVal; +} + + + template< class Parent > std::vector<SmartUtil::tstring> WidgetLoadFile<Parent>::showDialogMultiSelect() { |
|
From: andrew7 <bd...@us...> - 2007-06-09 13:46:01
|
Update of /cvsroot/smartwin/SmartWin/source In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10788 Modified Files: LibraryLoader.cpp Log Message: Adjust getProcAddress code to handle these situations: win32 multibyte, win32 unicode, and wince unicode. Index: LibraryLoader.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/source/LibraryLoader.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- LibraryLoader.cpp 20 Feb 2007 14:16:10 -0000 1.7 +++ LibraryLoader.cpp 9 Jun 2007 13:45:57 -0000 1.8 @@ -103,13 +103,23 @@ // Get procedure address from loaded library by name FARPROC LibraryLoader::getProcAddress( const SmartUtil::tstring & procedureName ) { +#ifdef WINCE + return ::GetProcAddress( itsHMod, SmartUtil::UnicodeGuaranteed::doConvert( procedureName, SmartUtil::ConversionCodepage::ANSI ).c_str() ); +#else return ::GetProcAddress( itsHMod, SmartUtil::AsciiGuaranteed::doConvert( procedureName, SmartUtil::ConversionCodepage::ANSI ).c_str() ); +#endif + // Strangely, GetProcAddress for WinCE needs LPCWSTR, and for Windows needs LPCSTR. + } // Get procedure address from loaded library by ordinal value FARPROC LibraryLoader::getProcAddress( long procedureOrdinal ) { +#ifdef WINCE + return ::GetProcAddress( itsHMod, (LPCWSTR)0 + procedureOrdinal ); +#else return ::GetProcAddress( itsHMod, (LPCSTR)0 + procedureOrdinal ); +#endif } |
|
From: andrew7 <bd...@us...> - 2007-04-11 14:32:24
|
Update of /cvsroot/smartwin/SmartWin/include/smartwin In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv5366/include/smartwin Modified Files: MessageMap.h Log Message: #ifdef out the ExtendedMenu use for WINCE Index: MessageMap.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/MessageMap.h,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- MessageMap.h 23 Feb 2007 09:46:35 -0000 1.27 +++ MessageMap.h 11 Apr 2007 14:32:19 -0000 1.28 @@ -320,12 +320,14 @@ #endif ) { +#ifndef WINCE if( msg == WM_INITMENUPOPUP && extPtr ) { HMENU handle = reinterpret_cast< HMENU >( extPtr->handle() ); if( handle != (HMENU) wPar ) continue; } +#endif // 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: andrew7 <bd...@us...> - 2007-03-19 02:49:00
|
Update of /cvsroot/smartwin/SmartWin/tests/WidgetModalDialog In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv26647/tests/WidgetModalDialog Modified Files: NumDialog.h Log Message: Use IDOK and IDCANCEL buttons in the pure dialog so we get ESC and Enter default keystroke handling. Index: NumDialog.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/WidgetModalDialog/NumDialog.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- NumDialog.h 30 Nov 2006 01:07:36 -0000 1.12 +++ NumDialog.h 18 Mar 2007 13:24:27 -0000 1.13 @@ -218,7 +218,8 @@ setText( _T( "A modal dialog without use of resource files" ) ); onClosing( & PureNumDialog::closing ); - itsCancelButton = createButton(); + WidgetButton::Seed cancelSeed; cancelSeed.setControlId( IDCANCEL ); + itsCancelButton = createButton( cancelSeed ); itsCancelButton->setText( _T( "Cancel" ) ); itsCancelButton->onClicked( & PureNumDialog::cancel_clicked ); @@ -228,7 +229,8 @@ itsAnotherModalButton->onClicked( & PureNumDialog::modalFromModalDialog ); #endif - itsOkButton = createButton(); + WidgetButton::Seed okSeed; okSeed.setControlId( IDOK ); + itsOkButton = createButton( okSeed ); itsOkButton->setText( _T( "OK" ) ); itsOkButton->onClicked( & PureNumDialog::ok_clicked ); |
|
From: andrew7 <bd...@us...> - 2007-03-19 02:10:15
|
Update of /cvsroot/smartwin/SmartWin/include/smartwin/widgets In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv25748/include/smartwin/widgets Modified Files: WidgetButton.h Log Message: Add way to specify the control id, which is needed for IDOK and IDCANCEL buttons in Dialogs: void setControlId( int id ) Index: WidgetButton.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/widgets/WidgetButton.h,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- WidgetButton.h 7 Dec 2006 13:43:26 -0000 1.28 +++ WidgetButton.h 18 Mar 2007 13:22:57 -0000 1.29 @@ -115,6 +115,11 @@ /// Doesn't fill any values Seed( DontInitialize ) {} + + /// Needed for IDOK and IDCANCEL buttons in Dialogs. + void setControlId( int id ) { + menuHandle= id; + } }; /// Default values for creation |
|
From: andrew7 <bd...@us...> - 2007-03-18 23:46:11
|
Update of /cvsroot/smartwin/SmartWin/include/smartwin/widgets In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10186/include/smartwin/widgets Modified Files: WidgetDataGrid.h Log Message: Add getSubItemHit so that the cell of a 2D dataGrid can be found from a mouse position. Index: WidgetDataGrid.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/widgets/WidgetDataGrid.h,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- WidgetDataGrid.h 11 Dec 2006 23:54:03 -0000 1.38 +++ WidgetDataGrid.h 18 Mar 2007 23:18:52 -0000 1.39 @@ -628,6 +628,16 @@ */ SmartUtil::tstring getColumnName( unsigned col ); + + /// Returns the cell of the item from the mouse position. + /** pos has the mouse position. + * ret.x has the column, ret.y has the row. both starting at 0. + * If either return is -1, then the pos was not in a cell. + */ + SmartWin::Point getSubItemHit( SmartWin::Point pos ); + + + /// Returns the checked state of the given row /** A list view can have checkboxes in each row, if the checkbox for the given * row is CHECKED this funtion returns true. @@ -1330,6 +1340,21 @@ return colInfo.pszText; } + + +template< class EventHandlerClass, class MessageMapPolicy > +SmartWin::Point WidgetDataGrid< EventHandlerClass, MessageMapPolicy >::getSubItemHit( SmartWin::Point pos ) +{ + LVHITTESTINFO info; + info.pt.x = pos.x; info.pt.y = pos.y; + ListView_SubItemHitTest( this->Widget::itsHandle, & info ); + + SmartWin::Point retval( info.iSubItem, info.iItem ); + return retval; +} + + + template< class EventHandlerClass, class MessageMapPolicy > bool WidgetDataGrid< EventHandlerClass, MessageMapPolicy >::getIsRowChecked( unsigned row ) { |
|
From: Stephan <ste...@us...> - 2007-02-25 00:32:52
|
Update of /cvsroot/smartwin/SmartWin/SmartUtil In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv16848 Modified Files: DateTime.cpp DateTime.h Log Message: Add support for unix timestamp (t_time) Index: DateTime.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/SmartUtil/DateTime.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- DateTime.h 9 Sep 2006 15:37:32 -0000 1.10 +++ DateTime.h 25 Feb 2007 00:32:47 -0000 1.11 @@ -34,6 +34,7 @@ #include "UtilSystemHeaders.h" #include "TimeSpan.h" #include "tstring.h" +#include <time.h> /// Contains utility classes for helping out with different aspects in SmartWin and SmartSOAP namespace SmartUtil @@ -67,6 +68,9 @@ /// Constructs a date according to the values given DateTime( unsigned year, unsigned month, unsigned day, unsigned hour = 0, unsigned minute = 0, unsigned seconds = 0, unsigned milliseconds = 0 ); + /// Constructs a date according to a unix timestamp value + DateTime( time_t unixtimestamp ); + /// Copy constructor DateTime( const DateTime & rhs ); @@ -102,6 +106,9 @@ /** The format must be in format of e.g. "dd:MM-yyyy" or "yyyy:MM:dd" where "yyyy" is four digits year, "MM" is two digits months and "dd" is two digits day. */ tstring toDateString( const tstring & format ) const; + + /// Converts the date to a unix timestamp + time_t DateTime::toUnixTimestamp() const; }; // TODO: Comments.... Index: DateTime.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/SmartUtil/DateTime.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- DateTime.cpp 9 Sep 2006 15:37:31 -0000 1.8 +++ DateTime.cpp 25 Feb 2007 00:32:47 -0000 1.9 @@ -102,6 +102,19 @@ itsSysTime.wMilliseconds = ( WORD ) milliseconds; } +DateTime::DateTime( time_t unixtimestamp ) +{ + struct tm* t = localtime(&unixtimestamp); + + memset(&itsSysTime,0,sizeof(SYSTEMTIME)); + itsSysTime.wYear = t->tm_year + 1900; + itsSysTime.wMonth = t->tm_mon + 1; + itsSysTime.wDay = t->tm_mday; + itsSysTime.wHour = t->tm_hour; + itsSysTime.wMinute = t->tm_min; + itsSysTime.wSecond = t->tm_sec; +} + DateTime::DateTime( const DateTime & rhs ) : itsSysTime( rhs.itsSysTime ) {} @@ -174,6 +187,21 @@ return tmp; } +time_t DateTime::toUnixTimestamp() const +{ + struct tm tm; + memset(&tm, 0, sizeof(tm)); + + tm.tm_year = itsSysTime.wYear - 1900; + tm.tm_mon = itsSysTime.wMonth - 1; + tm.tm_mday = itsSysTime.wDay; + tm.tm_hour = itsSysTime.wHour; + tm.tm_min = itsSysTime.wMinute; + tm.tm_sec = itsSysTime.wSecond; + + return mktime(&tm); +} + DateTime operator +( const DateTime & date, const TimeSpan & time ) { FILETIME file; |
|
From: Sergey H. <se...@us...> - 2007-02-23 09:46:39
|
Update of /cvsroot/smartwin/SmartWin/include/smartwin In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv20912 Modified Files: MessageMap.h Log Message: Fixed bug #1598489 [Crash on fast switch] Index: MessageMap.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/MessageMap.h,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- MessageMap.h 9 Dec 2006 22:06:11 -0000 1.26 +++ MessageMap.h 23 Feb 2007 09:46:35 -0000 1.27 @@ -365,7 +365,13 @@ } else if ( msg == WM_DRAWITEM && ( * idx )->handle() == reinterpret_cast< DRAWITEMSTRUCT * >( lPar )->hwndItem ) { - return ( * idx )->sendWidgetMessage( hWnd, msg, wPar, lPar ); + #ifndef WINCE + // Trick to fix BUG #1598489 + // During Fast-User-Switching ::GetForegroundWindows() returns NULL, + // And we should not try to draw on locked DC + if (::GetForegroundWindow() != NULL) + #endif + return ( * idx )->sendWidgetMessage( hWnd, msg, wPar, lPar ); } else if ( ( msg == WM_CTLCOLORSTATIC || |