igarden-commit Mailing List for GardenSketch (Page 4)
Status: Beta
Brought to you by:
jlbedell
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(24) |
Nov
(77) |
Dec
(122) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(103) |
Feb
(278) |
Mar
(130) |
Apr
(66) |
May
(56) |
Jun
(31) |
Jul
(94) |
Aug
(73) |
Sep
(22) |
Oct
(306) |
Nov
(52) |
Dec
|
| 2008 |
Jan
(27) |
Feb
(90) |
Mar
(218) |
Apr
(145) |
May
(114) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Jeffrey B. <jlb...@us...> - 2008-05-14 13:09:12
|
Update of /cvsroot/igarden/Garden/source/Reports In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv6411/source/Reports Modified Files: Tag: Release_branch_v1 RGReport.cpp RGReport.h Log Message: Attach the print dislog to the report dialog instead of the document Index: RGReport.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/Reports/RGReport.h,v retrieving revision 1.3.2.2 retrieving revision 1.3.2.3 diff -C2 -d -r1.3.2.2 -r1.3.2.3 *** RGReport.h 28 Dec 2006 00:44:37 -0000 1.3.2.2 --- RGReport.h 14 May 2008 13:09:14 -0000 1.3.2.3 *************** *** 105,109 **** void Run(short viewID); ! void Print(); // void PrintPreview(XGView *view); void DrawPage(XGDraw &draw, Rect *r, UInt32 page); --- 105,109 ---- void Run(short viewID); ! void Print(XGDialog *dlog); // void PrintPreview(XGView *view); void DrawPage(XGDraw &draw, Rect *r, UInt32 page); Index: RGReport.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/Reports/RGReport.cpp,v retrieving revision 1.7.2.6 retrieving revision 1.7.2.7 diff -C2 -d -r1.7.2.6 -r1.7.2.7 *** RGReport.cpp 29 Mar 2008 20:28:45 -0000 1.7.2.6 --- RGReport.cpp 14 May 2008 13:09:14 -0000 1.7.2.7 *************** *** 108,112 **** { _parent->OKClicked(this, dlog); ! _parent->Print(); } --- 108,112 ---- { _parent->OKClicked(this, dlog); ! _parent->Print(dlog); } *************** *** 187,191 **** } ! void RGReport::Print() { short first, last, n; --- 187,191 ---- } ! void RGReport::Print(XGDialog *dlog) { short first, last, n; *************** *** 195,199 **** bool abort; ! if(GPrinter.PrintJob(&first, &last, _doc->GetWindow()) != 0) return; --- 195,199 ---- bool abort; ! if(GPrinter.PrintJob(&first, &last, dlog /*_doc->GetWindow()*/ ) != 0) return; |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-14 13:08:34
|
Update of /cvsroot/igarden/Garden/source/Document In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv6004/source/Document Modified Files: Tag: Release_branch_v1 CPlanPanel.h CGardenForm.cpp CGardenPanel.h CPlanPanel.cpp Log Message: Close child windows before doing document save, so that the save dialog is attached to the correct window. Index: CPlanPanel.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/Document/CPlanPanel.h,v retrieving revision 1.12.2.5 retrieving revision 1.12.2.6 diff -C2 -d -r1.12.2.5 -r1.12.2.6 *** CPlanPanel.h 17 Apr 2008 10:44:21 -0000 1.12.2.5 --- CPlanPanel.h 14 May 2008 13:08:31 -0000 1.12.2.6 *************** *** 109,112 **** --- 109,113 ---- virtual void ScrollWheelMoved(wheelAxis_t axis, sint32 offset); virtual bool SetupContextMenu(RGContextMenu *menu); + virtual void CloseSubWindows(); static XGWindow *gToolPalleteWindow; Index: CPlanPanel.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/Document/CPlanPanel.cpp,v retrieving revision 1.4.2.9 retrieving revision 1.4.2.10 diff -C2 -d -r1.4.2.9 -r1.4.2.10 *** CPlanPanel.cpp 17 Apr 2008 10:44:23 -0000 1.4.2.9 --- CPlanPanel.cpp 14 May 2008 13:08:31 -0000 1.4.2.10 *************** *** 1241,1242 **** --- 1241,1246 ---- } + void CPlanPanel::CloseSubWindows() + { + ClearAlternativePalette(); + } Index: CGardenForm.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/Document/CGardenForm.cpp,v retrieving revision 1.4.2.12 retrieving revision 1.4.2.13 diff -C2 -d -r1.4.2.12 -r1.4.2.13 *** CGardenForm.cpp 10 May 2008 02:52:20 -0000 1.4.2.12 --- CGardenForm.cpp 14 May 2008 13:08:31 -0000 1.4.2.13 *************** *** 764,767 **** --- 764,768 ---- case KXGFileSave: + (_panels[_currentPanel])->CloseSubWindows(); _file->DoDocumentSave(); // Only called when passing events down from palettes return 0; Index: CGardenPanel.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/Document/CGardenPanel.h,v retrieving revision 1.8.2.6 retrieving revision 1.8.2.7 diff -C2 -d -r1.8.2.6 -r1.8.2.7 *** CGardenPanel.h 10 May 2008 02:52:20 -0000 1.8.2.6 --- CGardenPanel.h 14 May 2008 13:08:31 -0000 1.8.2.7 *************** *** 120,123 **** --- 120,125 ---- virtual void ScrollWheelMoved(wheelAxis_t axis, sint32 offset); virtual bool SetupContextMenu(RGContextMenu *menu) { return false; } + virtual void CloseSubWindows() {} + protected: // methods |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-14 13:06:31
|
Update of /cvsroot/igarden/CommonSource/YAAFExtensions In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv5207/YAAFExtensions Modified Files: Tag: Release_branch_v1 RGTableCell.cpp Log Message: Temporarily remove an assertion Index: RGTableCell.cpp =================================================================== RCS file: /cvsroot/igarden/CommonSource/YAAFExtensions/RGTableCell.cpp,v retrieving revision 1.46.2.23 retrieving revision 1.46.2.24 diff -C2 -d -r1.46.2.23 -r1.46.2.24 *** RGTableCell.cpp 12 Apr 2008 22:42:07 -0000 1.46.2.23 --- RGTableCell.cpp 14 May 2008 13:06:32 -0000 1.46.2.24 *************** *** 1333,1337 **** void RGTableCell::InlineClose(char *buffer) { ! MyAssert(_parent->_deferedChange == NULL); _parent->_deferedChange = new deferChange_t; // Always defer the message send (periodicTask sends) _parent->_deferedChange->fSelRow = _parent->GetSelectRow(); --- 1333,1337 ---- void RGTableCell::InlineClose(char *buffer) { ! // MyAssert(_parent->_deferedChange == NULL); _parent->_deferedChange = new deferChange_t; // Always defer the message send (periodicTask sends) _parent->_deferedChange->fSelRow = _parent->GetSelectRow(); |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-14 13:05:35
|
Update of /cvsroot/igarden/CommonSource/CQTImagePane In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv4773/CQTImagePane Modified Files: Tag: Release_branch_v1 CQTImagePane.cpp CQTImagePane.h Log Message: Clean up click vs. drag code Index: CQTImagePane.cpp =================================================================== RCS file: /cvsroot/igarden/CommonSource/CQTImagePane/CQTImagePane.cpp,v retrieving revision 1.8.2.2 retrieving revision 1.8.2.3 diff -C2 -d -r1.8.2.2 -r1.8.2.3 *** CQTImagePane.cpp 13 Mar 2008 01:15:57 -0000 1.8.2.2 --- CQTImagePane.cpp 14 May 2008 13:05:35 -0000 1.8.2.3 *************** *** 105,108 **** --- 105,110 ---- _imageType = kQTImagePicture; + _mouseDown = false; + // Create the GWorld Rect theFrameRect = GetContentRect(); *************** *** 361,366 **** --- 363,373 ---- CQTImagePane::DoMouseDown(Point aPoint, short modifiers) { + _mouseDown = true; + _mouseDownPos = aPoint; + _mouseDownMod = modifiers; + if(mDragMessage != 0) { + #if 0 dragImageInfo_t dragInfo; *************** *** 369,372 **** --- 376,382 ---- dragInfo.view = this; return DoDispatch(mDragMessage,GetViewID(), &dragInfo); + #else + return 0; + #endif } else *************** *** 378,384 **** --- 388,418 ---- } } + + void + CQTImagePane::DoMouseMove(Point aPoint, short /*modifiers*/) + { + if(_mouseDown && mDragMessage != 0) + { + short dx, dy; + + dx = aPoint.h - _mouseDownPos.h; + dy = aPoint.h - _mouseDownPos.h; + + if(dx < -2 || dx > 2 || dy < -2 || dy > 2) + { + dragImageInfo_t dragInfo; + + dragInfo.pt = _mouseDownPos; + dragInfo.mod = _mouseDownMod; + dragInfo.view = this; + DoDispatch(mDragMessage,GetViewID(), &dragInfo); + } + } + } + void CQTImagePane::DoMouseUp(Point /*aPoint*/, short /*modifiers*/) { + _mouseDown = false; if(mMessage != 0) { Index: CQTImagePane.h =================================================================== RCS file: /cvsroot/igarden/CommonSource/CQTImagePane/CQTImagePane.h,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -C2 -d -r1.5.2.1 -r1.5.2.2 *** CQTImagePane.h 13 Mar 2008 01:15:57 -0000 1.5.2.1 --- CQTImagePane.h 14 May 2008 13:05:35 -0000 1.5.2.2 *************** *** 75,78 **** --- 75,79 ---- virtual bool DoMouseDown(Point,short); virtual void DoMouseUp(Point,short); + virtual void DoMouseMove(Point,short); virtual void InvalView(Rect *r = NULL); *************** *** 152,154 **** --- 153,158 ---- CGWorld *_offscreen; imageType_t _imageType; + bool _mouseDown; + Point _mouseDownPos; + short _mouseDownMod; }; |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-13 12:19:39
|
Update of /cvsroot/igarden/Garden/source/SourceMaterialDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv4129/source/SourceMaterialDB Modified Files: Tag: Release_branch_v1 SourceQuery.cpp Log Message: Handle caase where query doesn't care about the type of material Index: SourceQuery.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/SourceMaterialDB/SourceQuery.cpp,v retrieving revision 1.19.2.5 retrieving revision 1.19.2.6 diff -C2 -d -r1.19.2.5 -r1.19.2.6 *** SourceQuery.cpp 13 May 2008 03:22:20 -0000 1.19.2.5 --- SourceQuery.cpp 13 May 2008 12:19:40 -0000 1.19.2.6 *************** *** 251,255 **** testMType = 0; ! if((keyMType == testMType) && (keyMType != 0)) { percent = oneItem->PercentageMatchInKey(this); --- 251,255 ---- testMType = 0; ! if((keyMType == testMType) || (keyMType == 0)) { percent = oneItem->PercentageMatchInKey(this); |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-13 12:12:06
|
Update of /cvsroot/igarden/Garden/source/resources/English.lproj In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv532/source/resources/English.lproj Modified Files: Tag: Release_branch_v1 Translation.xml Log Message: Add area calculation to info tool Index: Translation.xml =================================================================== RCS file: /cvsroot/igarden/Garden/source/resources/English.lproj/Attic/Translation.xml,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -C2 -d -r1.1.2.7 -r1.1.2.8 *** Translation.xml 6 Apr 2008 04:02:24 -0000 1.1.2.7 --- Translation.xml 13 May 2008 12:12:03 -0000 1.1.2.8 *************** *** 6,9 **** --- 6,10 ---- <xlate src=" (lower)"> (lower)"</xlate> <xlate src=" pixel) "> pixel) </xlate> + <xlate src=" pixels thick)"> pixels thick)</xlate> <xlate src=" Sp. "> Sp. </xlate> <xlate src=" to "> to </xlate> *************** *** 224,228 **** <xlate src="Drag the red and blue corners to crop the overview image">Drag the red and blue corners to crop the overview image</xlate> <xlate src="Drag the red and blue corners to show the area covered by this plot">Drag the red and blue corners to show the area covered by this plot</xlate> ! <xlate src="Drawn (">Drawn</xlate> <xlate src="Drop an aerial photo here, and then drag the red and blue lines from the corners to show the area covered by this garden plot.">Drop an aerial photo here, and then drag the red and blue lines from the corners to show the area covered by this garden plot.</xlate> <xlate src="Drought Tolerance">Drought Tolerance</xlate> --- 225,229 ---- <xlate src="Drag the red and blue corners to crop the overview image">Drag the red and blue corners to crop the overview image</xlate> <xlate src="Drag the red and blue corners to show the area covered by this plot">Drag the red and blue corners to show the area covered by this plot</xlate> ! <xlate src="Drawn (">Drawn (</xlate> <xlate src="Drop an aerial photo here, and then drag the red and blue lines from the corners to show the area covered by this garden plot.">Drop an aerial photo here, and then drag the red and blue lines from the corners to show the area covered by this garden plot.</xlate> <xlate src="Drought Tolerance">Drought Tolerance</xlate> *************** *** 240,243 **** --- 241,246 ---- <xlate src="Enabled">Enabled</xlate> <xlate src="Enable/Disable grid lines -- This button is a toggle.">Enable/Disable grid lines -- This button is a toggle.</xlate> + <xlate src="\nEnclosing %6.2f square feet">\nEnclosing %6.2f square feet</xlate> + <xlate src="\nEnclosing %6.2f square meters">\nEnclosing %6.2f square meters</xlate> <xlate src="English/Imperial" comment="feet and inches">English/Imperial</xlate> <xlate src="(#1L% enlargement for clarity at screen resolutions)">(#1L% enlargement for clarity at screen resolutions)</xlate> |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-13 12:12:03
|
Update of /cvsroot/igarden/Garden/source/LayoutDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv532/source/LayoutDB Modified Files: Tag: Release_branch_v1 PaintElement.cpp Log Message: Add area calculation to info tool Index: PaintElement.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/PaintElement.cpp,v retrieving revision 1.26.2.10 retrieving revision 1.26.2.11 diff -C2 -d -r1.26.2.10 -r1.26.2.11 *** PaintElement.cpp 10 May 2008 22:50:38 -0000 1.26.2.10 --- PaintElement.cpp 13 May 2008 12:12:00 -0000 1.26.2.11 *************** *** 328,331 **** --- 328,332 ---- measureUnits_t units; Path *path; + char msg[256]; String str, pathType; String text; *************** *** 338,344 **** // <n>' x <m>' rectangle (nn square feet) ! result = stx("Drawn ("); ! result += LineWeight(); ! result += stx(" pixel) "); path = GetPath(); path->PathSizeStr(units, text); --- 339,343 ---- // <n>' x <m>' rectangle (nn square feet) ! result = stx("Drawn "); path = GetPath(); path->PathSizeStr(units, text); *************** *** 348,351 **** --- 347,363 ---- result += pathType; + result += " ("; + result += LineWeight(); + result += stx(" pixels thick)"); + + if(!path->IsOpenPath()) + { + if(units == kEnglishUnits) + sprintf(msg, stx("\nEnclosing %6.2f square feet"), path->ComputeArea()/92903.04); + else + sprintf(msg, stx("\nEnclosing %6.2f square meters"), path->ComputeArea()/1000000.0); + result += msg; + } + Material *mat; String backgroundName; |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-13 03:22:24
|
Update of /cvsroot/igarden/Garden/source/SourceMaterialDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv26404/source/SourceMaterialDB Modified Files: Tag: Release_branch_v1 SourceQuery.h SourceQuery.cpp Log Message: Improve material search query Index: SourceQuery.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/SourceMaterialDB/SourceQuery.h,v retrieving revision 1.8.2.1 retrieving revision 1.8.2.2 diff -C2 -d -r1.8.2.1 -r1.8.2.2 *** SourceQuery.h 4 Sep 2007 00:12:03 -0000 1.8.2.1 --- SourceQuery.h 13 May 2008 03:22:20 -0000 1.8.2.2 *************** *** 78,82 **** void BuildQuery( XGStreamHandle *stream ); void SecondarySearch(QueryResult *resultPtr); ! // attributes bool _enableRemoteSearch; --- 78,83 ---- void BuildQuery( XGStreamHandle *stream ); void SecondarySearch(QueryResult *resultPtr); ! long SuccessPercentage(); ! // attributes bool _enableRemoteSearch; Index: SourceQuery.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/SourceMaterialDB/SourceQuery.cpp,v retrieving revision 1.19.2.4 retrieving revision 1.19.2.5 diff -C2 -d -r1.19.2.4 -r1.19.2.5 *** SourceQuery.cpp 21 Mar 2008 21:48:07 -0000 1.19.2.4 --- SourceQuery.cpp 13 May 2008 03:22:20 -0000 1.19.2.5 *************** *** 122,204 **** - // --------------------------------------------------------------------------- - /// SecondarySearch - // - /// Given a maximum number of responses, and using previously entered criteria, return a "top 10" type list of queryResult_t (an ObjAddr and a % match). */ - // - void SourceQuery::SecondarySearch(QueryResult *resultPtr) - { - InternetMaterialSearch *searchPlug; - String intName; - XGFileSpecifier pictSpec; - Int32 numPlugins, n; - bool isActive; - AppCallbacks *callback; - Plugin *plugin; - Material *intMaterial; - PluginManager *mgr = PluginManager::GetPluginManager(); - XGDirectory pictDir; - - MyAssert(this != NULL); - MyAssert(mgr != NULL); - MyAssert(resultPtr != NULL); - numPlugins = mgr->NumPluginsOfType(kSearchPlugin); - - callback = new AppCallbacks(); - - GetPictureRoot(pictSpec); - pictSpec.GetDirectory(pictDir); - - if(_enableRemoteSearch) - { - // Now that we have made primary matches, for each name matched, lookup - // the name on any scondary searches available. - MyAssert(resultPtr != NULL); - for(n = 0; n < numPlugins; n++) - { - isActive = mgr->IndexPluginsOfType(n, kSearchPlugin, &plugin); - if(isActive) - { - MyAssert(SUCCEEDED(plugin->QueryInterface( CFUUIDGetUUIDBytes( kMaterialSearchInterfaceID ), (LPVOID *)( &searchPlug ) ) ) ); - if(searchPlug->HandlesQueryTypes(kSecondarySearch)) - { - searchPlug->Setup(&pictDir, kPluginThermometer, callback); - resultPtr->Reset(); - intMaterial = resultPtr->NextMatch(); - while(intMaterial != NULL) - { - intName = intMaterial->GetCanonicalName(); - - XGFileHandle resultStream; - RGXMLWriter writer; - - writer.StartXMLWriter(&resultStream); - writer.WriteStartTag("Query"); - writer.WriteStartTagArg(kTagFieldCanonicalName, intName); - writer.WriteEndTag(); // Query - writer.EndXMLWriter(); - - String query(static_cast<char*>(*resultStream)); - CanonicalNameList_t result2; - String debug; - - InternetPlugin *myPlug; - MyAssert(SUCCEEDED(plugin->QueryInterface( CFUUIDGetUUIDBytes( kMaterialSearchInterfaceID ), (LPVOID *)( &myPlug ) ) ) ); - myPlug->GetName(debug); - - searchPlug->SetSourceQuery(kMaterialPropertiesSearch, query); - searchPlug->FindMatches(1, 20, result2); - delete intMaterial; - - intMaterial = resultPtr->NextMatch(); - } - } - } - } - } - - delete callback; - } - void SourceQuery::FindPictures(String &fullCanonicalName, pictureAmount_t amount, feedbackType_t feedback) { --- 122,125 ---- *************** *** 300,403 **** } - // --------------------------------------------------------------------------- - // void SourceQuery::BuildQuery( XGStreamHandle *stream ) - // --------------------------------------------------------------------------- - // - void SourceQuery::BuildQuery( XGStreamHandle *stream ) - { - XGXMLWriter writer; - String nameStr; - Int32 n, count; - materialType_t mtype; - char queryBuf[4096]; - ViewClass *vc; - attributeID_t propID; - const char *propName; - bool found; - long longVal; - - MyAssert(stream != NULL); - writer.StartXMLWriter(stream); - writer.WriteStartTag("Query"); - nameStr = GetCanonicalName(); - if(nameStr.Length() != 0) - { - writer.WriteStartTag(kTagFieldCanonicalName); - writer.WriteData(nameStr.c_str()); - writer.WriteEndTag(); // kTagFieldCanonicalName - } - else - { - nameStr = GetCommonName(); - if(nameStr.Length() != 0) - { - writer.WriteStartTag(kTagFieldCommonName); - writer.WriteData(nameStr.c_str()); - writer.WriteEndTag(); // kTagFieldCommonName - } - else - { - mtype = GetMaterialType(); - if(mtype != kMaterialTypeUnspecified) - { - writer.WriteStartTag(kTagFieldMaterialType); - sprintf(queryBuf, "%ld", static_cast<long>(mtype)); - writer.WriteData(queryBuf); - writer.WriteEndTag(); // CopyrightName - } - - vc = GetViewClass(); - - count = vc->NumProperties(); - for(n = 0; n < count; n++) - { - propID = static_cast<attributeID_t>(vc->GetNthPropertyID(n)); - if((propID != kFieldMaterialType) && AttributeDictionary::IsSearchAttr(propID) && AttributeDictionary::GetAttributeClass(propID) == kClassAttribute) - { - found = false; - - propName = vc->FieldName(propID); - switch(AttributeDictionary::TypeForID(propID)) - { - case kAttrMenu: - case kAttrBitfield: - if(GetInt32(propID, &longVal)) - { - if(longVal != 0) - { - sprintf(queryBuf, "%ld", longVal); - found = true; - } - } - break; - case kAttrSize: - case kAttrInteger: - if(GetInt32(propID, &longVal)) - { - sprintf(queryBuf, "%ld", longVal); - found = true; - } - break; - - default: - MyAssert(false); - break; - } - if(found) - { - writer.WriteStartTag("Arg"); - writer.WriteStartTagArg("Name", propName); - writer.WriteData((const char*)queryBuf); - writer.WriteEndTag(); // <Arg Name= > - } - } - } - } - } - writer.WriteEndTag(); // Query - writer.EndXMLWriter(); - stream->Write(1, ""); - stream->SetFilePos(0); - } // --------------------------------------------------------------------------- --- 221,224 ---- *************** *** 412,417 **** { QueryResult *localResult; ! Int16 percent; ! Int32 row, numRows, numVariants, v; Material *oneItem, *varItem; materialID_t id; --- 233,238 ---- { QueryResult *localResult; ! Int16 percent, successPercent; ! Int32 row, numRows, numVariants, v, keyMType, testMType; Material *oneItem, *varItem; materialID_t id; *************** *** 419,451 **** localResult = new QueryResult(_dbFile, SHRT_MAX); numRows = DBPersist::NumRows(_dbFile, kMaterialBodyCID); for(row = 0; row < numRows; row++) { oneItem = new Material(_dbFile, row); ! percent = oneItem->PercentageMatchInKey(this); ! if(percent != 0) { ! id = oneItem->GetMaterialID(); ! numVariants = oneItem->NumVariants(); ! if(numVariants != 0) { ! for(v = 0; v < numVariants; v++) { ! Variant *var; ! ! var = oneItem->GetIndexedVariant(v); ! var->GetVariantID(id.variant); ! varItem = new Material(_dbFile, id); ! percent = varItem->PercentageMatchInKey(this); ! if(percent != 0) { ! localResult->AppendItem(varItem->GetMaterialID(), percent, false); } - - delete varItem; } ! } ! else ! { localResult->AppendItem(oneItem->GetMaterialID(), percent, false); } --- 240,280 ---- localResult = new QueryResult(_dbFile, SHRT_MAX); + successPercent = SuccessPercentage(); numRows = DBPersist::NumRows(_dbFile, kMaterialBodyCID); + if(!GetInt32(kFieldMaterialType, &keyMType)) + keyMType = 0; + for(row = 0; row < numRows; row++) { oneItem = new Material(_dbFile, row); ! if(!oneItem->GetInt32(kFieldMaterialType, &testMType)) ! testMType = 0; ! ! if((keyMType == testMType) && (keyMType != 0)) { ! percent = oneItem->PercentageMatchInKey(this); ! if(percent > successPercent) { ! id = oneItem->GetMaterialID(); ! numVariants = oneItem->NumVariants(); ! if(numVariants != 0) { ! for(v = 0; v < numVariants; v++) { ! Variant *var; ! ! var = oneItem->GetIndexedVariant(v); ! var->GetVariantID(id.variant); ! varItem = new Material(_dbFile, id); ! percent = varItem->PercentageMatchInKey(this); ! if(percent > successPercent) ! { ! localResult->AppendItem(varItem->GetMaterialID(), percent, false); ! } ! ! delete varItem; } } ! localResult->AppendItem(oneItem->GetMaterialID(), percent, false); } *************** *** 756,757 **** --- 585,798 ---- return _statusEvent; } + + #pragma mark ***Private*** + + // --------------------------------------------------------------------------- + // void SourceQuery::BuildQuery( XGStreamHandle *stream ) + // --------------------------------------------------------------------------- + // + void SourceQuery::BuildQuery( XGStreamHandle *stream ) + { + XGXMLWriter writer; + String nameStr; + Int32 n, count; + materialType_t mtype; + char queryBuf[4096]; + ViewClass *vc; + attributeID_t propID; + const char *propName; + bool found; + long longVal; + + MyAssert(stream != NULL); + writer.StartXMLWriter(stream); + writer.WriteStartTag("Query"); + nameStr = GetCanonicalName(); + if(nameStr.Length() != 0) + { + writer.WriteStartTag(kTagFieldCanonicalName); + writer.WriteData(nameStr.c_str()); + writer.WriteEndTag(); // kTagFieldCanonicalName + } + else + { + nameStr = GetCommonName(); + if(nameStr.Length() != 0) + { + writer.WriteStartTag(kTagFieldCommonName); + writer.WriteData(nameStr.c_str()); + writer.WriteEndTag(); // kTagFieldCommonName + } + else + { + mtype = GetMaterialType(); + if(mtype != kMaterialTypeUnspecified) + { + writer.WriteStartTag(kTagFieldMaterialType); + sprintf(queryBuf, "%ld", static_cast<long>(mtype)); + writer.WriteData(queryBuf); + writer.WriteEndTag(); // CopyrightName + } + + vc = GetViewClass(); + + count = vc->NumProperties(); + for(n = 0; n < count; n++) + { + propID = static_cast<attributeID_t>(vc->GetNthPropertyID(n)); + if((propID != kFieldMaterialType) && AttributeDictionary::IsSearchAttr(propID) && AttributeDictionary::GetAttributeClass(propID) == kClassAttribute) + { + found = false; + + propName = vc->FieldName(propID); + switch(AttributeDictionary::TypeForID(propID)) + { + case kAttrMenu: + case kAttrBitfield: + if(GetInt32(propID, &longVal)) + { + if(longVal != 0) + { + sprintf(queryBuf, "%ld", longVal); + found = true; + } + } + break; + case kAttrSize: + case kAttrInteger: + if(GetInt32(propID, &longVal)) + { + sprintf(queryBuf, "%ld", longVal); + found = true; + } + break; + + default: + MyAssert(false); + break; + } + if(found) + { + writer.WriteStartTag("Arg"); + writer.WriteStartTagArg("Name", propName); + writer.WriteData((const char*)queryBuf); + writer.WriteEndTag(); // <Arg Name= > + } + } + } + } + } + writer.WriteEndTag(); // Query + writer.EndXMLWriter(); + stream->Write(1, ""); + stream->SetFilePos(0); + } + + // --------------------------------------------------------------------------- + /// SecondarySearch + // + /// Given a maximum number of responses, and using previously entered criteria, return a "top 10" type list of queryResult_t (an ObjAddr and a % match). */ + // + void SourceQuery::SecondarySearch(QueryResult *resultPtr) + { + InternetMaterialSearch *searchPlug; + String intName; + XGFileSpecifier pictSpec; + Int32 numPlugins, n; + bool isActive; + AppCallbacks *callback; + Plugin *plugin; + Material *intMaterial; + PluginManager *mgr = PluginManager::GetPluginManager(); + XGDirectory pictDir; + + MyAssert(this != NULL); + MyAssert(mgr != NULL); + MyAssert(resultPtr != NULL); + numPlugins = mgr->NumPluginsOfType(kSearchPlugin); + + callback = new AppCallbacks(); + + GetPictureRoot(pictSpec); + pictSpec.GetDirectory(pictDir); + + if(_enableRemoteSearch) + { + // Now that we have made primary matches, for each name matched, lookup + // the name on any scondary searches available. + MyAssert(resultPtr != NULL); + for(n = 0; n < numPlugins; n++) + { + isActive = mgr->IndexPluginsOfType(n, kSearchPlugin, &plugin); + if(isActive) + { + MyAssert(SUCCEEDED(plugin->QueryInterface( CFUUIDGetUUIDBytes( kMaterialSearchInterfaceID ), (LPVOID *)( &searchPlug ) ) ) ); + if(searchPlug->HandlesQueryTypes(kSecondarySearch)) + { + searchPlug->Setup(&pictDir, kPluginThermometer, callback); + resultPtr->Reset(); + intMaterial = resultPtr->NextMatch(); + while(intMaterial != NULL) + { + intName = intMaterial->GetCanonicalName(); + + XGFileHandle resultStream; + RGXMLWriter writer; + + writer.StartXMLWriter(&resultStream); + writer.WriteStartTag("Query"); + writer.WriteStartTagArg(kTagFieldCanonicalName, intName); + writer.WriteEndTag(); // Query + writer.EndXMLWriter(); + + String query(static_cast<char*>(*resultStream)); + CanonicalNameList_t result2; + String debug; + + InternetPlugin *myPlug; + MyAssert(SUCCEEDED(plugin->QueryInterface( CFUUIDGetUUIDBytes( kMaterialSearchInterfaceID ), (LPVOID *)( &myPlug ) ) ) ); + myPlug->GetName(debug); + + searchPlug->SetSourceQuery(kMaterialPropertiesSearch, query); + searchPlug->FindMatches(1, 20, result2); + delete intMaterial; + + intMaterial = resultPtr->NextMatch(); + } + } + } + } + } + + delete callback; + } + + + // --------------------------------------------------------------------------- + /// SecondarySearch + // + /// returns the percentage match required for success. + /// For now, 2 elements of the query must match + // + long SourceQuery::SuccessPercentage() + { + c4_View *view; + long count, iter, itemsInKey, result; + propertyID_t propertyID; + + view = GetView(); + count = GetViewClass()->NumProperties(); + + for(iter = 0, itemsInKey=0; iter < count; iter++) + { + propertyID = GetViewClass()->GetNthPropertyID(iter); + if(!isEmpty(propertyID)) // Must be something in pattern (mat) + itemsInKey++; + } + if(itemsInKey <= 2) + result = 99; // Not 100% to avoid rounding errors + else + result = static_cast<long>(2.0 / itemsInKey); + + return result; + } |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-13 03:00:14
|
Update of /cvsroot/igarden/Garden/source/SourceMaterialDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv8858/source/SourceMaterialDB Modified Files: Tag: Release_branch_v1 AttributeDictionary.cpp AttributeDictionary.h Log Message: Improve material search query Index: AttributeDictionary.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/SourceMaterialDB/AttributeDictionary.cpp,v retrieving revision 1.41.2.9 retrieving revision 1.41.2.10 diff -C2 -d -r1.41.2.9 -r1.41.2.10 *** AttributeDictionary.cpp 21 Mar 2008 22:07:33 -0000 1.41.2.9 --- AttributeDictionary.cpp 13 May 2008 03:00:09 -0000 1.41.2.10 *************** *** 1844,1847 **** --- 1844,1848 ---- view = key->GetView(); count = key->GetViewClass()->NumProperties(); + for(iter = 0, totalItems = 0, matchingItems = 0; iter < count; iter++) { *************** *** 1850,1856 **** { totalItems++; ! if(!record->isEmpty(propertyID)) { ! if(propertyID == kFieldCanonicalName) { String nameOne, nameTwo; --- 1851,1882 ---- { totalItems++; ! ! if(record->isEmpty(propertyID)) { ! if(MatchIfEmpty(propertyID)) ! matchingItems++; ! } ! else ! { ! if(propertyID == kPlantZone) ! { ! long mtype; ! ! if(record->GetInt32(kFieldMaterialType, &mtype) && ! ((mtype == kMaterialTypeAnnual) || (mtype == kMaterialTypeAnnualVegetable))) ! { ! matchingItems++; ! } ! else ! { ! Int32 intA, intB; ! ! record->GetInt32(propertyID, &intA); ! key->GetInt32(propertyID, &intB); ! if((intA & intB) != 0) ! matchingItems++; ! } ! } ! else if(propertyID == kFieldCanonicalName) { String nameOne, nameTwo; *************** *** 1889,1892 **** --- 1915,1920 ---- otherType = key->GetMaterialType(); + printf(" myType = %ld otherType = %ld\n", myType, otherType); + if(otherType == myType) matchingItems++; *************** *** 1896,1902 **** myItem = myType & 0x0000FFFFL; testGroup = otherType & 0xFFFF0000L; ! if(myGroup == 0) ! matchingItems++; ! else if(myGroup == testGroup && myItem == 0 ? true : false) matchingItems++; } --- 1924,1928 ---- myItem = myType & 0x0000FFFFL; testGroup = otherType & 0xFFFF0000L; ! if(myGroup == testGroup && myItem == 0 ? true : false) matchingItems++; } *************** *** 1913,1922 **** case kAttrMenu: case kAttrSize: ! if(record->GetInt32(propertyID, &intA) && key->GetInt32(propertyID, &intB)) ! { ! if(intA == intB) ! matchingItems++; ! } ! else matchingItems++; break; --- 1939,1945 ---- case kAttrMenu: case kAttrSize: ! record->GetInt32(propertyID, &intA); ! key->GetInt32(propertyID, &intB); ! if(intA == intB) matchingItems++; break; *************** *** 1924,1933 **** case kAttrBitfield: case kAttrBitfieldRange: ! if(record->GetInt32(propertyID, &intA) && key->GetInt32(propertyID, &intB)) ! { ! if((intA & intB) != 0) ! matchingItems++; ! } ! else matchingItems++; break; --- 1947,1953 ---- case kAttrBitfield: case kAttrBitfieldRange: ! record->GetInt32(propertyID, &intA); ! key->GetInt32(propertyID, &intB); ! if((intA & intB) != 0) matchingItems++; break; *************** *** 1935,1944 **** case kAttrSizeRange: case kAttrIntegerRange: ! if(record->GetValueInt32Range(propertyID, lowerA, upperA) && key->GetValueInt32Range(propertyID, lowerB, upperB)) ! { ! if(lowerA >= lowerB && upperA <= upperB) ! matchingItems++; ! } ! else matchingItems++; break; --- 1955,1961 ---- case kAttrSizeRange: case kAttrIntegerRange: ! record->GetValueInt32Range(propertyID, lowerA, upperA); ! key->GetValueInt32Range(propertyID, lowerB, upperB); ! if(lowerA >= lowerB && upperA <= upperB) matchingItems++; break; *************** *** 1975,1979 **** } } ! if(totalItems != 0) return (matchingItems * 100) / totalItems; --- 1992,1996 ---- } } ! if(totalItems != 0) return (matchingItems * 100) / totalItems; *************** *** 1983,1986 **** --- 2000,2043 ---- } + bool AttributeDictionary::MatchIfEmpty(propertyID_t id) + { + switch(id) + { + case kFieldCanonicalName: + case kFieldVariantName: + case kFieldCommonName: + case kFieldMaterialType: + case kDescription: + case kAlternateCommonNames: + return false; + + default: + return true; + } + + // kPlantZone, kPlantSpread, kPlantForm, + // kGrowthRate, kLifeExpectancy, kSoilPh, + // kSoilTexture, kSoilMoisture, kRootPattern, + // kTransplantEase, kTransplantCondition, kAvailability, + // kShadeTolerance, kBranchPattern, kLeafingPeriod, + // kFoliageFinish, kFoliageTexture, kFoliageDensity, + // kFoliageColor, kAutumnColor, kAutumnVisibility, + // kLeafFall, kSex, kFlowerType, + // kFlowerColor, kFlowerSeason, kFlowerDuration, + // kFlowerVisibility, kFlowerFragrance, kFruitType, + // kFruitColor, kFruitPeriod, kFruitDuration, + // kFruitVisibility, kEdibility, kSongbirdValue, + // kFlowerSize, kCutFlower, kFruitFrequency, + // kFruitStorable, kAirborneSaltTolerance, kOzoneTolerance, + // kAirPollutionTolerance, kFloodTolerance, kDroughtTolerance, + // kSulphurDioxideTolerance, kWinterWindTolerance, kBranchTexture, + // kBranchDensity, kTwigColor, kBarkTexture, + // kBarkColor, kPlantHeightYr20, kPlantSpreadYr20, + // kFlowerHeight, kSowLocation, kPlantSeedDepth, + // kNumSeedsSown, kUserComments, kInstanceSupplierIDs, + // kMaterialLength, kMaterialWidth, kPlantInstanceHeight, + // kPlantInstanceSpread, kMaterialInstanceLength, kMaterialInstanceWidth, + } + // --------------------------------------------------------------------------- Index: AttributeDictionary.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/SourceMaterialDB/AttributeDictionary.h,v retrieving revision 1.9.2.3 retrieving revision 1.9.2.4 diff -C2 -d -r1.9.2.3 -r1.9.2.4 *** AttributeDictionary.h 21 Mar 2008 22:07:33 -0000 1.9.2.3 --- AttributeDictionary.h 13 May 2008 03:00:11 -0000 1.9.2.4 *************** *** 89,92 **** --- 89,93 ---- // methods static void AddInfoEntry(attributeID_t id, attributeType_t typeVal, attributeClass_t classVal, char *argXMLName, short resourceID = 0); + static bool MatchIfEmpty(propertyID_t id); // attributes |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-13 02:57:28
|
Update of /cvsroot/igarden/CommonSource/YAAFExtensions In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv7131/YAAFExtensions Modified Files: Tag: Release_branch_v1 RGGLSVGDraw.cpp Log Message: Remove debug prints Index: RGGLSVGDraw.cpp =================================================================== RCS file: /cvsroot/igarden/CommonSource/YAAFExtensions/RGGLSVGDraw.cpp,v retrieving revision 1.26.2.25 retrieving revision 1.26.2.26 diff -C2 -d -r1.26.2.25 -r1.26.2.26 *** RGGLSVGDraw.cpp 10 May 2008 03:50:19 -0000 1.26.2.25 --- RGGLSVGDraw.cpp 13 May 2008 02:57:28 -0000 1.26.2.26 *************** *** 323,327 **** long i, count; - printf("LoadParseTree: Count = %ld\n", _SVGCache.Length()); count = _SVGCache.Length(); for(i = 0; i < count; i++) --- 323,326 ---- |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-13 02:55:50
|
Update of /cvsroot/igarden/Garden/source/resources In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv5699/source/resources Modified Files: Tag: Release_branch_v1 Garden.r Garden.rdata Garden.rc Garden.cin Log Message: Widen the search window so that the menus fit Index: Garden.r =================================================================== RCS file: /cvsroot/igarden/Garden/source/resources/Garden.r,v retrieving revision 1.61.2.51 retrieving revision 1.61.2.52 diff -C2 -d -r1.61.2.51 -r1.61.2.52 *** Garden.r 12 Apr 2008 19:05:32 -0000 1.61.2.51 --- Garden.r 13 May 2008 02:55:30 -0000 1.61.2.52 *************** *** 2745,2749 **** $"0000000000000056" /* .......V */ $"0000004677696E64" /* ...Fwind */ ! $"0000000000000000" /* ........ */ $"FFFF000000A00000" /* ........ */ $"0000000000000000" /* ........ */ --- 2745,2749 ---- $"0000000000000056" /* .......V */ $"0000004677696E64" /* ...Fwind */ ! $"0000030000000000" /* ........ */ $"FFFF000000A00000" /* ........ */ $"0000000000000000" /* ........ */ *************** *** 3016,3021 **** $"0000000000000000" /* ........ */ $"0000000000000000" /* ........ */ ! $"00000000024E0000" /* .....N.. */ ! $"01EA0000024E0000" /* .....N.. */ $"01EA000000000000" /* ........ */ $"0000065365617263" /* ...Searc */ --- 3016,3021 ---- $"0000000000000000" /* ........ */ $"0000000000000000" /* ........ */ ! $"0000000002620000" /* .....b.. */ ! $"01EA000002620000" /* .....b.. */ $"01EA000000000000" /* ........ */ $"0000065365617263" /* ...Searc */ *************** *** 3113,3117 **** $"00000000FFFFFFFF" /* ........ */ $"00000000000001A0" /* ........ */ ! $"0000006000000228" /* ...`...( */ $"000000760000FFFF" /* ...v.... */ $"0000000000000000" /* ........ */ --- 3113,3117 ---- $"00000000FFFFFFFF" /* ........ */ $"00000000000001A0" /* ........ */ ! $"0000006000000250" /* ...`...P */ $"000000760000FFFF" /* ...v.... */ $"0000000000000000" /* ........ */ *************** *** 3121,3125 **** $"FFFF000000000000" /* ........ */ $"01A0000000480000" /* .....H.. */ ! $"02280000005EFFFF" /* .(...^.. */ $"FFFF000000000000" /* ........ */ $"0000003A00000000" /* ...:.... */ --- 3121,3125 ---- $"FFFF000000000000" /* ........ */ $"01A0000000480000" /* .....H.. */ ! $"02500000005EFFFF" /* .P...^.. */ $"FFFF000000000000" /* ........ */ $"0000003A00000000" /* ...:.... */ *************** *** 3128,3132 **** $"FFFFFFFF00000000" /* ........ */ $"000001A000000030" /* .......0 */ ! $"0000022800000046" /* ...(...F */ $"FFFFFFFF00000000" /* ........ */ $"0000000000460000" /* .....F.. */ --- 3128,3132 ---- $"FFFFFFFF00000000" /* ........ */ $"000001A000000030" /* .......0 */ ! $"0000025000000046" /* ...P...F */ $"FFFFFFFF00000000" /* ........ */ $"0000000000460000" /* .....F.. */ *************** *** 3134,3139 **** $"746E000075310000" /* tn..u1.. */ $"0000FFFFFFFF0000" /* ........ */ ! $"0000000001DC0000" /* ........ */ ! $"01C5000002400000" /* .....@.. */ $"01E1FFFFFFFFFFFF" /* ........ */ $"0000000000000000" /* ........ */ --- 3134,3139 ---- $"746E000075310000" /* tn..u1.. */ $"0000FFFFFFFF0000" /* ........ */ ! $"0000000001EC0000" /* ........ */ ! $"01C5000002500000" /* .....P.. */ $"01E1FFFFFFFFFFFF" /* ........ */ $"0000000000000000" /* ........ */ Index: Garden.rdata =================================================================== RCS file: /cvsroot/igarden/Garden/source/resources/Garden.rdata,v retrieving revision 1.4.2.20 retrieving revision 1.4.2.21 diff -C2 -d -r1.4.2.20 -r1.4.2.21 Binary files /tmp/cvsoXo5Rf and /tmp/cvsJMMiIp differ Index: Garden.cin =================================================================== RCS file: /cvsroot/igarden/Garden/source/resources/Garden.cin,v retrieving revision 1.61.2.51 retrieving revision 1.61.2.52 diff -C2 -d -r1.61.2.51 -r1.61.2.52 Binary files /tmp/cvsIG356I and /tmp/cvscImwpU differ Index: Garden.rc =================================================================== RCS file: /cvsroot/igarden/Garden/source/resources/Garden.rc,v retrieving revision 1.4.2.20 retrieving revision 1.4.2.21 diff -C2 -d -r1.4.2.20 -r1.4.2.21 *** Garden.rc 12 Apr 2008 19:05:31 -0000 1.4.2.20 --- Garden.rc 13 May 2008 02:55:51 -0000 1.4.2.21 *************** *** 2745,2749 **** 0x0000, 0x0000, 0x0000, 0x5600, /* .......V */ 0x0000, 0x4600, 0x6977, 0x646E, /* ...Fwind */ ! 0x0000, 0x0000, 0x0000, 0x0000, /* ........ */ 0xFFFF, 0x0000, 0xA000, 0x0000, /* ........ */ 0x0000, 0x0000, 0x0000, 0x0000, /* ........ */ --- 2745,2749 ---- 0x0000, 0x0000, 0x0000, 0x5600, /* .......V */ 0x0000, 0x4600, 0x6977, 0x646E, /* ...Fwind */ ! 0x0000, 0x0003, 0x0000, 0x0000, /* ........ */ 0xFFFF, 0x0000, 0xA000, 0x0000, /* ........ */ 0x0000, 0x0000, 0x0000, 0x0000, /* ........ */ *************** *** 3016,3021 **** 0x0000, 0x0000, 0x0000, 0x0000, /* ........ */ 0x0000, 0x0000, 0x0000, 0x0000, /* ........ */ ! 0x0000, 0x0000, 0x4E02, 0x0000, /* .....N.. */ ! 0xEA01, 0x0000, 0x4E02, 0x0000, /* .....N.. */ 0xEA01, 0x0000, 0x0000, 0x0000, /* ........ */ 0x0000, 0x5306, 0x6165, 0x6372, /* ...Searc */ --- 3016,3021 ---- 0x0000, 0x0000, 0x0000, 0x0000, /* ........ */ 0x0000, 0x0000, 0x0000, 0x0000, /* ........ */ ! 0x0000, 0x0000, 0x6202, 0x0000, /* .....b.. */ ! 0xEA01, 0x0000, 0x6202, 0x0000, /* .....b.. */ 0xEA01, 0x0000, 0x0000, 0x0000, /* ........ */ 0x0000, 0x5306, 0x6165, 0x6372, /* ...Searc */ *************** *** 3113,3117 **** 0x0000, 0x0000, 0xFFFF, 0xFFFF, /* ........ */ 0x0000, 0x0000, 0x0000, 0xA001, /* ........ */ ! 0x0000, 0x6000, 0x0000, 0x2802, /* ...`...( */ 0x0000, 0x7600, 0x0000, 0xFFFF, /* ...v.... */ 0x0000, 0x0000, 0x0000, 0x0000, /* ........ */ --- 3113,3117 ---- 0x0000, 0x0000, 0xFFFF, 0xFFFF, /* ........ */ 0x0000, 0x0000, 0x0000, 0xA001, /* ........ */ ! 0x0000, 0x6000, 0x0000, 0x5002, /* ...`...P */ 0x0000, 0x7600, 0x0000, 0xFFFF, /* ...v.... */ 0x0000, 0x0000, 0x0000, 0x0000, /* ........ */ *************** *** 3121,3125 **** 0xFFFF, 0x0000, 0x0000, 0x0000, /* ........ */ 0xA001, 0x0000, 0x4800, 0x0000, /* .....H.. */ ! 0x2802, 0x0000, 0x5E00, 0xFFFF, /* .(...^.. */ 0xFFFF, 0x0000, 0x0000, 0x0000, /* ........ */ 0x0000, 0x3A00, 0x0000, 0x0000, /* ...:.... */ --- 3121,3125 ---- 0xFFFF, 0x0000, 0x0000, 0x0000, /* ........ */ 0xA001, 0x0000, 0x4800, 0x0000, /* .....H.. */ ! 0x5002, 0x0000, 0x5E00, 0xFFFF, /* .P...^.. */ 0xFFFF, 0x0000, 0x0000, 0x0000, /* ........ */ 0x0000, 0x3A00, 0x0000, 0x0000, /* ...:.... */ *************** *** 3128,3132 **** 0xFFFF, 0xFFFF, 0x0000, 0x0000, /* ........ */ 0x0000, 0xA001, 0x0000, 0x3000, /* .......0 */ ! 0x0000, 0x2802, 0x0000, 0x4600, /* ...(...F */ 0xFFFF, 0xFFFF, 0x0000, 0x0000, /* ........ */ 0x0000, 0x0000, 0x4600, 0x0000, /* .....F.. */ --- 3128,3132 ---- 0xFFFF, 0xFFFF, 0x0000, 0x0000, /* ........ */ 0x0000, 0xA001, 0x0000, 0x3000, /* .......0 */ ! 0x0000, 0x5002, 0x0000, 0x4600, /* ...P...F */ 0xFFFF, 0xFFFF, 0x0000, 0x0000, /* ........ */ 0x0000, 0x0000, 0x4600, 0x0000, /* .....F.. */ *************** *** 3134,3139 **** 0x6E74, 0x0000, 0x3175, 0x0000, /* tn..u1.. */ 0x0000, 0xFFFF, 0xFFFF, 0x0000, /* ........ */ ! 0x0000, 0x0000, 0xDC01, 0x0000, /* ........ */ ! 0xC501, 0x0000, 0x4002, 0x0000, /* .....@.. */ 0xE101, 0xFFFF, 0xFFFF, 0xFFFF, /* ........ */ 0x0000, 0x0000, 0x0000, 0x0000, /* ........ */ --- 3134,3139 ---- 0x6E74, 0x0000, 0x3175, 0x0000, /* tn..u1.. */ 0x0000, 0xFFFF, 0xFFFF, 0x0000, /* ........ */ ! 0x0000, 0x0000, 0xEC01, 0x0000, /* ........ */ ! 0xC501, 0x0000, 0x5002, 0x0000, /* .....P.. */ 0xE101, 0xFFFF, 0xFFFF, 0xFFFF, /* ........ */ 0x0000, 0x0000, 0x0000, 0x0000, /* ........ */ |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-12 11:18:20
|
Update of /cvsroot/igarden/Garden/source/SourceMaterialDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv23264/source/SourceMaterialDB Modified Files: Tag: Release_branch_v1 QueryDialog.h QueryDialog.cpp Log Message: Handle zone as one of the search parameters (from Site Data) Index: QueryDialog.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/SourceMaterialDB/QueryDialog.cpp,v retrieving revision 1.25.2.9 retrieving revision 1.25.2.10 diff -C2 -d -r1.25.2.9 -r1.25.2.10 *** QueryDialog.cpp 11 May 2008 12:43:08 -0000 1.25.2.9 --- QueryDialog.cpp 12 May 2008 11:18:20 -0000 1.25.2.10 *************** *** 140,143 **** --- 140,146 ---- QueryDialog::QueryDialog( CGardenForm* super, SourceMaterialFile* database ) { + PersistentTags *prefs = GetActivePreferences(super ? super->GetFile() : NULL); + Int32 zonePref; + _query = new SourceQuery(database); _super = super; *************** *** 146,153 **** _timer = new XGTimer; _advertDisplayed = false; ! UpdateSummary(); ! ! PersistentTags *prefs = GetActivePreferences(super ? super->GetFile() : NULL); DoPreferencesChanged(0, prefs); } // --------------------------------------------------------------------------- --- 149,155 ---- _timer = new XGTimer; _advertDisplayed = false; ! DoPreferencesChanged(0, prefs); + UpdateSummary(); } // --------------------------------------------------------------------------- *************** *** 741,748 **** void QueryDialog::ClearControls() { ! XGEditText *et; DBPersist::SetMaxRows(_query->GetStorage(), kSearchesCID, 0); _query = new SourceQuery(SourceMaterialFile::GetSourceDatabase()); SetupControlsFromAttributes(); --- 743,755 ---- void QueryDialog::ClearControls() { ! XGEditText *et; DBPersist::SetMaxRows(_query->GetStorage(), kSearchesCID, 0); _query = new SourceQuery(SourceMaterialFile::GetSourceDatabase()); + + PRECONDITION(_query != NULL); + _query->EnableRemoteSearch(GlobalTags::_globalPrefs->GetBoolPref(kUseInternetPref)); + + LoadZoneData(); SetupControlsFromAttributes(); *************** *** 753,756 **** --- 760,777 ---- } + void QueryDialog::LoadZoneData() + { + Int32 zonePref; + + PersistentTags *prefs = GetActivePreferences(_super ? _super->GetFile() : NULL); + if(prefs->GetInt32Pref(kZoneSiteData, zonePref)) + { + zonePref = ToggleRangeBits(0x00000001, zonePref); + _query->SetInt32(kPlantZone, zonePref); + } + else + _query->ClearInt32(kPlantZone); + } + // --------------------------------------------------------------------------- // void QueryDialog::HandleAttributeMenuMsg( Int32 panelIndex, Int32 viewID ) *************** *** 1773,1779 **** // long QueryDialog::DoPreferencesChanged( long /*arg*/, void* /*parg*/ ) ! { PRECONDITION(_query != NULL); _query->EnableRemoteSearch(GlobalTags::_globalPrefs->GetBoolPref(kUseInternetPref)); return(0); --- 1794,1802 ---- // long QueryDialog::DoPreferencesChanged( long /*arg*/, void* /*parg*/ ) ! { PRECONDITION(_query != NULL); _query->EnableRemoteSearch(GlobalTags::_globalPrefs->GetBoolPref(kUseInternetPref)); + LoadZoneData(); + QueryDialog::UpdateSummary(); return(0); Index: QueryDialog.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/SourceMaterialDB/QueryDialog.h,v retrieving revision 1.8.2.2 retrieving revision 1.8.2.3 diff -C2 -d -r1.8.2.2 -r1.8.2.3 *** QueryDialog.h 19 Mar 2008 01:07:43 -0000 1.8.2.2 --- QueryDialog.h 12 May 2008 11:18:19 -0000 1.8.2.3 *************** *** 89,92 **** --- 89,93 ---- void SetStatus(const char *message); void Initialize(XGWindow* dialog); + void LoadZoneData(); void DoSetStatus(long arg, void* parg); long DoGetMenuStatus(long arg, void* parg); |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-12 11:18:20
|
Update of /cvsroot/igarden/Garden/source/SiteData In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv23264/source/SiteData Modified Files: Tag: Release_branch_v1 SiteDataDialog.cpp Log Message: Handle zone as one of the search parameters (from Site Data) Index: SiteDataDialog.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/SiteData/SiteDataDialog.cpp,v retrieving revision 1.14.2.7 retrieving revision 1.14.2.8 diff -C2 -d -r1.14.2.7 -r1.14.2.8 *** SiteDataDialog.cpp 26 Mar 2008 22:29:46 -0000 1.14.2.7 --- SiteDataDialog.cpp 12 May 2008 11:18:20 -0000 1.14.2.8 *************** *** 80,84 **** AttributeDictionary::GetIndexedEnumDisplayValue(kPlantZone, n, value); zonePop->Insert(n, value.c_str()); ! if(n << 1L == _zone) zonePop->SetValue(n); } --- 80,86 ---- AttributeDictionary::GetIndexedEnumDisplayValue(kPlantZone, n, value); zonePop->Insert(n, value.c_str()); ! if(_zone == 0) ! zonePop->SetValue(0); ! else if(1L << (n-1) == _zone) zonePop->SetValue(n); } *************** *** 160,163 **** --- 162,166 ---- XGPopControl *zonePop, *regionPop; char shortMsg[256], longMsg[256]; + long val; switch (viewID) *************** *** 166,170 **** zonePop = dynamic_cast<XGPopControl*>(dlog->FindViewByID(kSiteZone)); AssertValidView(zonePop); ! _zone = zonePop->GetValue() << 1L; break; case kSiteRegionMenu: --- 169,177 ---- zonePop = dynamic_cast<XGPopControl*>(dlog->FindViewByID(kSiteZone)); AssertValidView(zonePop); ! val = zonePop->GetValue(); ! if(val >= 1) ! _zone = 1L << (val - 1); ! else ! _zone = 0; break; case kSiteRegionMenu: *************** *** 289,292 **** --- 296,300 ---- _prefs->SetInt32Pref(kZoneSiteData, _zone); + if(_hasSpringFrost) _prefs->SetDatePref(kSpringFrostSiteData, _springFrost); |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-11 12:43:09
|
Update of /cvsroot/igarden/Garden/source/SourceMaterialDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv10387/source/SourceMaterialDB Modified Files: Tag: Release_branch_v1 QueryDialog.cpp Log Message: Clean up the QueryDialog Index: QueryDialog.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/SourceMaterialDB/QueryDialog.cpp,v retrieving revision 1.25.2.8 retrieving revision 1.25.2.9 diff -C2 -d -r1.25.2.8 -r1.25.2.9 *** QueryDialog.cpp 10 May 2008 00:26:54 -0000 1.25.2.8 --- QueryDialog.cpp 11 May 2008 12:43:08 -0000 1.25.2.9 *************** *** 175,179 **** obj->Initialize(obj->_window); obj->EnablePlugins(); ! #if !OPT_MACOS_CARBON ProfilerDump("\pProfile"); --- 175,180 ---- obj->Initialize(obj->_window); obj->EnablePlugins(); ! obj->ClearControls(); ! #if !OPT_MACOS_CARBON ProfilerDump("\pProfile"); *************** *** 1020,1024 **** table->DisableDrawing(); siz = table->GetSize(); ! table->AppendColumn(siz.h, stx("color"), RGColorCell::Factory); table->SetTitleHeight(0); table->AppendRow(false); --- 1021,1025 ---- table->DisableDrawing(); siz = table->GetSize(); ! table->AppendColumn(siz.h-kBorderWidths, stx("color"), RGColorCell::Factory); table->SetTitleHeight(0); table->AppendRow(false); *************** *** 1481,1485 **** panels->ChangeCurrentPanel(pop->GetValue()); EnableActivePanels(); - SetupControlsFromAttributes(); } else if(arg == kQueryType) --- 1482,1485 ---- |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-11 12:42:55
|
Update of /cvsroot/igarden/CommonSource/YAAFExtensions In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv10190/YAAFExtensions Modified Files: Tag: Release_branch_v1 RGTableView.h Log Message: Clean up the QueryDialog Index: RGTableView.h =================================================================== RCS file: /cvsroot/igarden/CommonSource/YAAFExtensions/RGTableView.h,v retrieving revision 1.16.2.15 retrieving revision 1.16.2.16 diff -C2 -d -r1.16.2.15 -r1.16.2.16 *** RGTableView.h 9 Apr 2008 03:36:53 -0000 1.16.2.15 --- RGTableView.h 11 May 2008 12:42:56 -0000 1.16.2.16 *************** *** 72,75 **** --- 72,77 ---- typedef enum { kSortAscending, kSortDescending } sortOrder_t; + extern const short kBorderWidths; + class ClientRow : public XGObject { |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-11 02:59:44
|
Update of /cvsroot/igarden/Garden/source/PlanTool In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv30542/source/PlanTool Modified Files: Tag: Release_branch_v1 ToolPalette.cpp Log Message: FIx a crash in the palette Index: ToolPalette.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/ToolPalette.cpp,v retrieving revision 1.20.2.7 retrieving revision 1.20.2.8 diff -C2 -d -r1.20.2.7 -r1.20.2.8 *** ToolPalette.cpp 19 Mar 2008 01:35:55 -0000 1.20.2.7 --- ToolPalette.cpp 11 May 2008 02:59:50 -0000 1.20.2.8 *************** *** 554,558 **** if(!enabled && _currentPlanTool == _pathElementTools[n].planTool) { ! toolCount = _planTools.Length(); for(tool = 0; tool < toolCount; tool++) { --- 554,558 ---- if(!enabled && _currentPlanTool == _pathElementTools[n].planTool) { ! toolCount = _pathElementTools.Length(); for(tool = 0; tool < toolCount; tool++) { |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-11 02:59:10
|
Update of /cvsroot/igarden/Garden/source/PlanTool In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv30388/source/PlanTool Modified Files: Tag: Release_branch_v1 SelectedElements.cpp Log Message: Fix a comment Index: SelectedElements.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/SelectedElements.cpp,v retrieving revision 1.23.2.4 retrieving revision 1.23.2.5 diff -C2 -d -r1.23.2.4 -r1.23.2.5 *** SelectedElements.cpp 10 May 2008 22:52:53 -0000 1.23.2.4 --- SelectedElements.cpp 11 May 2008 02:59:08 -0000 1.23.2.5 *************** *** 71,75 **** /// GetIndexedSelectedElement // ! /// Index (1-based) into the list of selected items. Used with count to iterate. // Element* SelectedElements::GetIndexedSelectedElement( UInt32 index ) --- 71,75 ---- /// GetIndexedSelectedElement // ! /// Index (0-based) into the list of selected items. Used with count to iterate. // Element* SelectedElements::GetIndexedSelectedElement( UInt32 index ) |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-11 02:58:31
|
Update of /cvsroot/igarden/Garden/source/LayoutDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv30111/source/LayoutDB Modified Files: Tag: Release_branch_v1 GardenPlot.cpp Log Message: Handle creating overview plots without an aerial photo Index: GardenPlot.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/GardenPlot.cpp,v retrieving revision 1.50.2.13 retrieving revision 1.50.2.14 diff -C2 -d -r1.50.2.13 -r1.50.2.14 *** GardenPlot.cpp 26 Mar 2008 22:27:14 -0000 1.50.2.13 --- GardenPlot.cpp 11 May 2008 02:58:26 -0000 1.50.2.14 *************** *** 243,249 **** { if(isOverview) ! SetPosition((plot->_cropPixelRect.left - _cropPixelRect.left) * _aerialPhotoScale.scale, ! (_plotHeight - ((plot->_cropPixelRect.top - _cropPixelRect.top) * _aerialPhotoScale.scale)) - plot->_plotHeight, ! 0.0); } } --- 243,258 ---- { if(isOverview) ! { ! if(IsAerialPicturePresent()) ! { ! SetPosition((plot->_cropPixelRect.left - _cropPixelRect.left) * _aerialPhotoScale.scale, ! (_plotHeight - ((plot->_cropPixelRect.top - _cropPixelRect.top) * _aerialPhotoScale.scale)) - plot->_plotHeight, ! 0.0); ! } ! else ! { ! SetPosition(0, (_plotHeight - plot->_plotHeight), 0.0); ! } ! } } } |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-10 22:53:15
|
Update of /cvsroot/igarden/Garden/source/PlanTool In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv24363/source/PlanTool Modified Files: Tag: Release_branch_v1 WritablePlanView.cpp SelectedElements.cpp WritablePlanView.h PlanView.h PlanView.cpp SelectedElements.h Log Message: Fix problem where elements would look selected when they weren't Index: SelectedElements.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/SelectedElements.h,v retrieving revision 1.10 retrieving revision 1.10.2.1 diff -C2 -d -r1.10 -r1.10.2.1 *** SelectedElements.h 28 Jun 2005 12:51:19 -0000 1.10 --- SelectedElements.h 10 May 2008 22:52:53 -0000 1.10.2.1 *************** *** 75,78 **** --- 75,79 ---- bool HasInfoWindows(); void MakeInfoWindows(ClientDocument *doc, PlanView *view, Point &showAt); + bool IsElementSelected(Element *elem); protected: Index: PlanView.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/PlanView.h,v retrieving revision 1.26.2.5 retrieving revision 1.26.2.6 diff -C2 -d -r1.26.2.5 -r1.26.2.6 *** PlanView.h 19 Mar 2008 01:37:42 -0000 1.26.2.5 --- PlanView.h 10 May 2008 22:52:53 -0000 1.26.2.6 *************** *** 45,48 **** --- 45,49 ---- class CGWorld; class PersistentTags; + class Element; using yaaf::XGView; *************** *** 146,149 **** --- 147,151 ---- englishRounding_t GetMeasurementRounding() { return _rounding; } void AllowDraw(bool val, const char *msg=NULL); + virtual bool IsElementSelected(Element *elem); PersistentTags *GetPrefs() { return _prefs; } Index: SelectedElements.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/SelectedElements.cpp,v retrieving revision 1.23.2.3 retrieving revision 1.23.2.4 diff -C2 -d -r1.23.2.3 -r1.23.2.4 *** SelectedElements.cpp 26 Mar 2008 22:27:16 -0000 1.23.2.3 --- SelectedElements.cpp 10 May 2008 22:52:53 -0000 1.23.2.4 *************** *** 34,45 **** // --------------------------------------------------------------------------- ! // void SelectedElements::AddSelectedElements( Element* selectedItem ) ! // --------------------------------------------------------------------------- // ! /* Add one element to the list of selected items. */ ! ! ! void ! SelectedElements::AddSelectedElements( Element* selectedItem ) { short n, count; --- 34,42 ---- // --------------------------------------------------------------------------- ! /// AddSelectedElements // ! /// Add one element to the list of selected items. ! // ! void SelectedElements::AddSelectedElements( Element* selectedItem ) { short n, count; *************** *** 55,94 **** { _selected.push_back(selectedItem); ! selectedItem->Select(true, _view); } } - // --------------------------------------------------------------------------- - // Int16 SelectedElements::NumSelectedElements() - // --------------------------------------------------------------------------- - // - /* Count the numner of selected items. */ ! Int16 ! SelectedElements::NumSelectedElements() { return _selected.Length(); } - // --------------------------------------------------------------------------- - // Element* SelectedElements::GetIndexedSelectedElement( UInt32 index ) - // --------------------------------------------------------------------------- - // - /* Index (1-based) into the list of selected items. Used with count to iterate. */ ! Element* ! SelectedElements::GetIndexedSelectedElement( UInt32 index ) { return _selected[index]; } - // --------------------------------------------------------------------------- - // void SelectedElements::ToggleElement( Element* unselectedItem ) - // --------------------------------------------------------------------------- - // - /* If the given element is not present, add it. If it is present, remove it. */ ! void ! SelectedElements::ToggleElement( Element* unselectedItem ) { Int32 n, numSelected; --- 52,88 ---- { _selected.push_back(selectedItem); ! selectedItem->RefreshElement(_view); } } ! // --------------------------------------------------------------------------- ! /// NumSelectedElements ! // ! /// Count the numner of selected items. ! // ! Int16 SelectedElements::NumSelectedElements() { return _selected.Length(); } ! // --------------------------------------------------------------------------- ! /// GetIndexedSelectedElement ! // ! /// Index (1-based) into the list of selected items. Used with count to iterate. ! // ! Element* SelectedElements::GetIndexedSelectedElement( UInt32 index ) { return _selected[index]; } ! // --------------------------------------------------------------------------- ! /// ToggleElement ! // ! /// If the given element is not present, add it. If it is present, remove it. ! // ! void SelectedElements::ToggleElement( Element* unselectedItem ) { Int32 n, numSelected; *************** *** 102,107 **** if(unselectedItem == elem) { - elem->Select(false, _view); _selected.Delete(n); found = true; } --- 96,101 ---- if(unselectedItem == elem) { _selected.Delete(n); + unselectedItem->RefreshElement(_view); found = true; } *************** *** 113,145 **** } } - // --------------------------------------------------------------------------- - // void SelectedElements::RemoveAllSelected() - // --------------------------------------------------------------------------- - // - /* Remove all elements, as when the user click outside of the view. */ ! void ! SelectedElements::RemoveAllSelected() { ! UInt32 n, numSelected; ! Element *elem; ! numSelected = _selected.Length(); ! for(n = 0; n < numSelected; n++) { elem = _selected[n]; ! elem->Select(false, _view); } - _selected.DeleteAll(); } - // --------------------------------------------------------------------------- - // SelectedElements::SelectedElements( WritablePlanView* view ) - // --------------------------------------------------------------------------- - // - /* Constructor */ - SelectedElements::SelectedElements( WritablePlanView* view ) : _view(view) --- 107,135 ---- } } ! // --------------------------------------------------------------------------- ! /// RemoveAllSelected ! // ! /// Remove all elements, as when the user click outside of the view. ! // ! void SelectedElements::RemoveAllSelected() { ! long n, count; ! Element *elem; ! count = _selected.Length(); ! for(n = count-1; n >= 0; n--) { elem = _selected[n]; ! _selected.Delete(n); ! elem->RefreshElement(_view); } } + // --------------------------------------------------------------------------- + /// SelectedElements + // SelectedElements::SelectedElements( WritablePlanView* view ) : _view(view) *************** *** 147,170 **** } - // --------------------------------------------------------------------------- - // SelectedElements::~SelectedElements() - // --------------------------------------------------------------------------- - // - /* Destructor */ - SelectedElements::~SelectedElements() { } - // --------------------------------------------------------------------------- - // Element * SelectedElements::GetSelectedElementOnPoint( planPoint_t point, PlanView* view ) - // --------------------------------------------------------------------------- - // ! Element * ! SelectedElements::GetSelectedElementOnPoint( planPoint_t point, PlanView* view ) { UInt32 n, numElem; --- 137,155 ---- } + // --------------------------------------------------------------------------- + /// ~SelectedElements + // SelectedElements::~SelectedElements() { } ! // --------------------------------------------------------------------------- ! /// GetSelectedElementOnPoint ! // ! Element *SelectedElements::GetSelectedElementOnPoint( planPoint_t point, PlanView* view ) { UInt32 n, numElem; *************** *** 183,194 **** return result; } - // --------------------------------------------------------------------------- - // void SelectedElements::MoveElements( Int32 dx, Int32 dy, bool doRefresh ) - // --------------------------------------------------------------------------- - // ! void ! SelectedElements::MoveElements( planLength_t dx, planLength_t dy, bool doRefresh ) { UInt32 n, numElem; --- 168,177 ---- return result; } ! // --------------------------------------------------------------------------- ! /// MoveElements ! // ! void SelectedElements::MoveElements( planLength_t dx, planLength_t dy, bool doRefresh ) { UInt32 n, numElem; *************** *** 207,219 **** } } - // --------------------------------------------------------------------------- - // planRectangle_t SelectedElements::GetBoundingRectangle() - // --------------------------------------------------------------------------- - // - /* Get the minimal rectangle which completely encloses the path. */ ! planRectangle_t ! SelectedElements::GetBoundingRectangle() { planRectangle_t rect; --- 190,201 ---- } } ! // --------------------------------------------------------------------------- ! /// RemoveAllSelected ! // ! /// Get the minimal rectangle which completely encloses the path. ! // ! planRectangle_t SelectedElements::GetBoundingRectangle() { planRectangle_t rect; *************** *** 261,272 **** return rect; } - // --------------------------------------------------------------------------- - // void SelectedElements::ShowElements() - // --------------------------------------------------------------------------- - // ! void ! SelectedElements::ShowElements() { Element *elem; --- 243,252 ---- return rect; } ! // --------------------------------------------------------------------------- ! /// ShowElements ! // ! void SelectedElements::ShowElements() { Element *elem; *************** *** 280,291 **** } } - // --------------------------------------------------------------------------- - // void SelectedElements::HideElements() - // --------------------------------------------------------------------------- - // ! void ! SelectedElements::HideElements() { Element *elem; --- 260,269 ---- } } ! // --------------------------------------------------------------------------- ! /// HideElements ! // ! void SelectedElements::HideElements() { Element *elem; *************** *** 299,310 **** } } - // --------------------------------------------------------------------------- - // void SelectedElements::DrawElements( PlanView* view, XGDraw& draw ) - // --------------------------------------------------------------------------- - // ! void ! SelectedElements::DrawElements( PlanView* view) { Element *elem; --- 277,286 ---- } } ! // --------------------------------------------------------------------------- ! /// DrawElements ! // ! void SelectedElements::DrawElements( PlanView* view) { Element *elem; *************** *** 322,331 **** } } - // --------------------------------------------------------------------------- - // void SelectedElements::CutToClipboard() - // --------------------------------------------------------------------------- - // void SelectedElements::CutToClipboard(XGFileHandle &stream) { --- 298,306 ---- } } + // --------------------------------------------------------------------------- + /// CutToClipboard + // void SelectedElements::CutToClipboard(XGFileHandle &stream) { *************** *** 350,361 **** _selected.DeleteAll(); } - // --------------------------------------------------------------------------- - // void SelectedElements::CopyToClipboard() - // --------------------------------------------------------------------------- - // ! void ! SelectedElements::CopyToClipboard() { RGClipboard* clipboard = RGClipboard::GetClipboard(); --- 325,334 ---- _selected.DeleteAll(); } ! // --------------------------------------------------------------------------- ! /// CopyToClipboard ! // ! void SelectedElements::CopyToClipboard() { RGClipboard* clipboard = RGClipboard::GetClipboard(); *************** *** 376,379 **** --- 349,356 ---- } + + // --------------------------------------------------------------------------- + /// Delete + // void SelectedElements::Delete(PlanDeleteAction *action) { *************** *** 389,401 **** } // --------------------------------------------------------------------------- ! // void SelectedElements::RemoveElement( Element* selectedItem ) ! // --------------------------------------------------------------------------- // ! /* Remove one element from the list of selected items. */ ! ! ! void ! SelectedElements::RemoveElement( Element* selectedItem ) { UInt32 n, numElem; --- 366,376 ---- } + // --------------------------------------------------------------------------- ! /// RemoveAllSelected // ! /// Remove one element from the list of selected items. ! // ! void SelectedElements::RemoveElement( Element* selectedItem ) { UInt32 n, numElem; *************** *** 410,421 **** } } - // --------------------------------------------------------------------------- - // void SelectedElements::AddElementsToAction( PlanMoveAction* action ) - // --------------------------------------------------------------------------- - // ! void ! SelectedElements::AddElementsToAction( PlanMoveAction* action ) { UInt32 n, numElem; --- 385,394 ---- } } ! // --------------------------------------------------------------------------- ! /// AddElementsToAction ! // ! void SelectedElements::AddElementsToAction( PlanMoveAction* action ) { UInt32 n, numElem; *************** *** 429,441 **** } } - // --------------------------------------------------------------------------- - // bool SelectedElements::KeyEvent( long value ) - // --------------------------------------------------------------------------- - // - /* Return true if you used the keystroke (goes only to the first responding) */ ! bool ! SelectedElements::KeyEvent( long value ) { UInt32 n, numElem; --- 402,413 ---- } } ! // --------------------------------------------------------------------------- ! /// KeyEvent ! // ! /// Return true if you used the keystroke (goes only to the first responding). ! // ! bool SelectedElements::KeyEvent( long value ) { UInt32 n, numElem; *************** *** 460,471 **** return accepted; } - // --------------------------------------------------------------------------- - // bool SelectedElements::ContentMouseDown( planPoint_t point ) - // --------------------------------------------------------------------------- - // ! bool ! SelectedElements::ContentMouseDown( planPoint_t point ) { UInt32 n, numElem; --- 432,441 ---- return accepted; } ! // --------------------------------------------------------------------------- ! /// ContentMouseDown ! // ! bool SelectedElements::ContentMouseDown( planPoint_t point ) { UInt32 n, numElem; *************** *** 489,500 **** return inContent; } - // --------------------------------------------------------------------------- - // bool SelectedElements::ContentMouseMoved( planPoint_t point ) - // --------------------------------------------------------------------------- - // ! bool ! SelectedElements::ContentMouseMoved( planPoint_t point ) { UInt32 n, numElem; --- 459,468 ---- return inContent; } ! // --------------------------------------------------------------------------- ! /// ContentMouseMoved ! // ! bool SelectedElements::ContentMouseMoved( planPoint_t point ) { UInt32 n, numElem; *************** *** 518,529 **** return inContent; } - // --------------------------------------------------------------------------- - // bool SelectedElements::ContentMouseUp( planPoint_t point, short modifiers, bool doubleClick ) - // --------------------------------------------------------------------------- - // ! bool ! SelectedElements::ContentMouseUp( planPoint_t point, short modifiers, bool doubleClick ) { UInt32 n, numElem; --- 486,495 ---- return inContent; } ! // --------------------------------------------------------------------------- ! /// ContentMouseUp ! // ! bool SelectedElements::ContentMouseUp( planPoint_t point, short modifiers, bool doubleClick ) { UInt32 n, numElem; *************** *** 547,559 **** return inContent; } - // --------------------------------------------------------------------------- - // Element* SelectedElements::FirstElementMatchingTool( PlanTool* tool ) - // --------------------------------------------------------------------------- - // - /* Returns NULL if none matching */ ! Element* ! SelectedElements::FirstElementMatchingTool( PlanTool* tool ) { UInt32 n, numElem; --- 513,524 ---- return inContent; } ! // --------------------------------------------------------------------------- ! /// FirstElementMatchingTool ! // ! /// Returns NULL if none matching. ! // ! Element* SelectedElements::FirstElementMatchingTool( PlanTool* tool ) { UInt32 n, numElem; *************** *** 577,588 **** return result; } - // --------------------------------------------------------------------------- - // long SelectedElements::DoGetMenuStatus( long arg, void* parg ) - // --------------------------------------------------------------------------- - // ! long ! SelectedElements::DoGetMenuStatus( long arg, void* parg ) { UInt32 n, numElem; --- 542,551 ---- return result; } ! // --------------------------------------------------------------------------- ! /// DoGetMenuStatus ! // ! long SelectedElements::DoGetMenuStatus( long arg, void* parg ) { UInt32 n, numElem; *************** *** 601,612 **** return result; } - // --------------------------------------------------------------------------- - // long SelectedElements::DoMenuCommand( long arg, void* parg ) - // --------------------------------------------------------------------------- - // ! long ! SelectedElements::DoMenuCommand( long arg, void* parg ) { UInt32 n, numElem; --- 564,573 ---- return result; } ! // --------------------------------------------------------------------------- ! /// DoMenuCommand ! // ! long SelectedElements::DoMenuCommand( long arg, void* parg ) { UInt32 n, numElem; *************** *** 628,637 **** return result; } - // --------------------------------------------------------------------------- - // long SelectedElements::DoIdle( long arg, void* parg ) - // --------------------------------------------------------------------------- - // long SelectedElements::DoIdle( long arg, void* parg ) { --- 589,597 ---- return result; } + // --------------------------------------------------------------------------- + /// DoIdle + // long SelectedElements::DoIdle( long arg, void* parg ) { *************** *** 653,656 **** --- 613,620 ---- } + + // --------------------------------------------------------------------------- + /// HasInfoWindows + // bool SelectedElements::HasInfoWindows() { *************** *** 667,670 **** --- 631,638 ---- } + + // --------------------------------------------------------------------------- + /// MakeInfoWindows + // void SelectedElements::MakeInfoWindows(ClientDocument *doc, PlanView *view, Point &showAt) { *************** *** 677,678 **** --- 645,665 ---- } } + + + // --------------------------------------------------------------------------- + /// IsElementSelected + // + bool SelectedElements::IsElementSelected(Element *elem) + { + UInt32 n, numElem; + bool found; + + numElem = _selected.Length(); + for(n=0, found=false; (n < numElem) && !found; n++) + { + found = (elem == _selected[n]); + } + + return found; + } + Index: WritablePlanView.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/WritablePlanView.cpp,v retrieving revision 1.23.2.3 retrieving revision 1.23.2.4 diff -C2 -d -r1.23.2.3 -r1.23.2.4 *** WritablePlanView.cpp 22 Aug 2007 13:02:45 -0000 1.23.2.3 --- WritablePlanView.cpp 10 May 2008 22:52:53 -0000 1.23.2.4 *************** *** 57,67 **** const long kPlanToolDragMaterialUndoRedoIndex = 17; - // --------------------------------------------------------------------------- - // WritablePlanView::WritablePlanView( XGView* parent, XGArgStream& stream ) - // --------------------------------------------------------------------------- - // - WritablePlanView::WritablePlanView( XGView* parent, XGArgStream& stream ) : PlanView(parent, stream), XGDropper(), _activePath(NULL) --- 57,65 ---- const long kPlanToolDragMaterialUndoRedoIndex = 17; + // --------------------------------------------------------------------------- + /// WritablePlanView + // WritablePlanView::WritablePlanView( XGView* parent, XGArgStream& stream ) : PlanView(parent, stream), XGDropper(), _activePath(NULL) *************** *** 71,81 **** InitDropper(this, NULL); } - // --------------------------------------------------------------------------- - // WritablePlanView::~WritablePlanView() - // --------------------------------------------------------------------------- - // - WritablePlanView::~WritablePlanView() { --- 69,77 ---- InitDropper(this, NULL); } + // --------------------------------------------------------------------------- + /// ~WritablePlanView + // WritablePlanView::~WritablePlanView() { *************** *** 83,95 **** delete _selected; } - // --------------------------------------------------------------------------- - // void WritablePlanView::SetActivePath( Path* activePath ) - // --------------------------------------------------------------------------- - // - /* Sets the given path as the active path, which will be assigned to the next element created. Throws a fault if there is already a current active path. */ ! void ! WritablePlanView::SetActivePath( Path* activePath ) { PRECONDITION(activePath != NULL); --- 79,91 ---- delete _selected; } ! // --------------------------------------------------------------------------- ! /// SetActivePath ! // ! /// Sets the given path as the active path, which will be assigned to the next element created. ! /// Throws a fault if there is already a current active path. ! // ! void WritablePlanView::SetActivePath( Path* activePath ) { PRECONDITION(activePath != NULL); *************** *** 99,123 **** _activePath = activePath; } - // --------------------------------------------------------------------------- - // Path* WritablePlanView::GetActivePath() - // --------------------------------------------------------------------------- - // - /* Get the current active path. */ ! Path* ! WritablePlanView::GetActivePath() { return _activePath; } - // --------------------------------------------------------------------------- - // void WritablePlanView::ClearActivePath() - // --------------------------------------------------------------------------- - // - /* Clear the current active path and dispose the path object. Use after assigning the path to an element. */ ! void ! WritablePlanView::ClearActivePath() { if(_activePath != NULL) --- 95,117 ---- _activePath = activePath; } ! // --------------------------------------------------------------------------- ! /// GetActivePath ! // ! /// Get the current active path. ! // ! Path* WritablePlanView::GetActivePath() { return _activePath; } ! // --------------------------------------------------------------------------- ! /// ClearActivePath ! // ! /// Clear the current active path and dispose the path object. Use after assigning the path to an element. ! // ! void WritablePlanView::ClearActivePath() { if(_activePath != NULL) *************** *** 128,163 **** // --------------------------------------------------------------------------- ! // bool WritablePlanView::IsWritable() ! // --------------------------------------------------------------------------- // ! /* Returns true for this class, false for its superclass. */ ! ! ! bool ! WritablePlanView::IsWritable() { return true; } - // --------------------------------------------------------------------------- - // SelectedElements* WritablePlanView::GetSelectList() - // --------------------------------------------------------------------------- - // - /* Get the selected elements object. */ ! SelectedElements* ! WritablePlanView::GetSelectList() { POSTCONDITION(_selected); return _selected; } - // --------------------------------------------------------------------------- - // bool WritablePlanView::PlanPointsAreClose( planPoint_t point1, planPoint_t point2 ) - // --------------------------------------------------------------------------- - // ! bool ! WritablePlanView::PlanPointsAreClose( planPoint_t point1, planPoint_t point2 ) { Point pix1, pix2; --- 122,151 ---- // --------------------------------------------------------------------------- ! /// IsWritable // ! /// Returns true for this class, false for its superclass. ! // ! bool WritablePlanView::IsWritable() { return true; } ! // --------------------------------------------------------------------------- ! /// GetSelectList ! // ! /// Get the selected elements object ! // ! SelectedElements* WritablePlanView::GetSelectList() { POSTCONDITION(_selected); return _selected; } ! // --------------------------------------------------------------------------- ! /// PlanPointsAreClose ! // ! bool WritablePlanView::PlanPointsAreClose( planPoint_t point1, planPoint_t point2 ) { Point pix1, pix2; *************** *** 168,190 **** (abs(pix1.v - pix2.v) <= multiClick_Distance) ); } - // --------------------------------------------------------------------------- - // void WritablePlanView::UsingPath( Path* path ) - // --------------------------------------------------------------------------- - // - /* If the acti e path is == path, then clear it without deleting it, as it's being used by an element. */ ! void ! WritablePlanView::UsingPath( Path* path ) { if(path == _activePath) _activePath = NULL; // Don't delete } - // --------------------------------------------------------------------------- - // void WritablePlanView::PasteFromClipboard() - // --------------------------------------------------------------------------- - // void WritablePlanView::PasteFromClipboard() { --- 156,176 ---- (abs(pix1.v - pix2.v) <= multiClick_Distance) ); } ! // --------------------------------------------------------------------------- ! /// UsingPath ! // ! /// If the acti e path is == path, then clear it without deleting it, as it's being used by an element. ! // ! void WritablePlanView::UsingPath( Path* path ) { if(path == _activePath) _activePath = NULL; // Don't delete } + // --------------------------------------------------------------------------- + /// PasteFromClipboard + // void WritablePlanView::PasteFromClipboard() { *************** *** 196,199 **** --- 182,189 ---- } + + // --------------------------------------------------------------------------- + /// PasteFromStream + // void WritablePlanView::PasteFromStream(XGFileHandle &stream) { *************** *** 216,238 **** } // --------------------------------------------------------------------------- ! // long WritablePlanView::DoKeyPress( long arg, void* parg ) ! // --------------------------------------------------------------------------- // ! ! ! long ! WritablePlanView::DoKeyPress( long /*arg*/, void* /*parg*/ ) { return -1; } - // --------------------------------------------------------------------------- - // void WritablePlanView::Draw( XGDraw& draw ) - // --------------------------------------------------------------------------- - // ! void ! WritablePlanView::Draw() { PRECONDITION(_selected != NULL); --- 206,223 ---- } + // --------------------------------------------------------------------------- ! /// DoKeyPress // ! long WritablePlanView::DoKeyPress( long /*arg*/, void* /*parg*/ ) { return -1; } ! // --------------------------------------------------------------------------- ! /// Draw ! // ! void WritablePlanView::Draw() { PRECONDITION(_selected != NULL); *************** *** 241,252 **** _selected->DrawElements(this); } - // --------------------------------------------------------------------------- - // bool WritablePlanView::Accept( long modifiers, long itemRef, long flavor ) - // --------------------------------------------------------------------------- - // ! bool ! WritablePlanView::Accept( long /*modifiers*/, long /*itemRef*/, long flavor ) { // remove selection so that drag can't possibly be interpreted as "move elements". --- 226,235 ---- _selected->DrawElements(this); } ! // --------------------------------------------------------------------------- ! /// Accept ! // ! bool WritablePlanView::Accept( long /*modifiers*/, long /*itemRef*/, long flavor ) { // remove selection so that drag can't possibly be interpreted as "move elements". *************** *** 254,265 **** return(static_cast<UInt32>(flavor) == kMaterialDragFlavor); } - // --------------------------------------------------------------------------- - // void WritablePlanView::Track( Point where, long modifiers ) - // --------------------------------------------------------------------------- - // ! void ! WritablePlanView::Track( Point /*where*/, long /*modifiers*/ ) { } --- 237,246 ---- return(static_cast<UInt32>(flavor) == kMaterialDragFlavor); } ! // --------------------------------------------------------------------------- ! /// Track ! // ! void WritablePlanView::Track( Point /*where*/, long /*modifiers*/ ) { } *************** *** 267,288 **** // --------------------------------------------------------------------------- ! // bool WritablePlanView::DropStart( Point where, long modifiers ) ! // --------------------------------------------------------------------------- // ! ! ! bool ! WritablePlanView::DropStart( Point /*where*/, long /*modifiers*/ ) { return true; } - // --------------------------------------------------------------------------- - // bool WritablePlanView::Drop( Point where, long modifiers, long itemRef, long flavor, void* dataPtr, long dataLen ) - // --------------------------------------------------------------------------- - // ! bool ! WritablePlanView::Drop( Point where, long /*modifiers*/, long /*itemRef*/, long flavor, void* dataPtr, long dataLen ) { materialID_t *dragMaterial; --- 248,263 ---- // --------------------------------------------------------------------------- ! /// DropStart // ! bool WritablePlanView::DropStart( Point /*where*/, long /*modifiers*/ ) { return true; } ! // --------------------------------------------------------------------------- ! /// Drop ! // ! bool WritablePlanView::Drop( Point where, long /*modifiers*/, long /*itemRef*/, long flavor, void* dataPtr, long dataLen ) { materialID_t *dragMaterial; *************** *** 496,507 **** return true; } // --------------------------------------------------------------------------- ! // void WritablePlanView::DropEnd( Point where, long modifiers ) ! // --------------------------------------------------------------------------- // ! void ! WritablePlanView::DropEnd( Point /*where*/, long /*modifiers*/ ) { } --- 471,490 ---- return true; } + + // --------------------------------------------------------------------------- ! /// DropEnd // + void WritablePlanView::DropEnd( Point /*where*/, long /*modifiers*/ ) + { + } ! // --------------------------------------------------------------------------- ! /// IsElementSelected ! // ! bool WritablePlanView::IsElementSelected(Element *elem) { + return _selected->IsElementSelected(elem); } + Index: WritablePlanView.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/WritablePlanView.h,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** WritablePlanView.h 16 May 2005 22:17:39 -0000 1.6 --- WritablePlanView.h 10 May 2008 22:52:53 -0000 1.6.2.1 *************** *** 61,64 **** --- 61,65 ---- virtual bool Drop(Point where, long modifiers, long itemRef, long flavor, void* dataPtr, long dataLen); virtual void DropEnd(Point where, long modifiers); + virtual bool IsElementSelected(Element *elem); protected: Index: PlanView.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/PlanView.cpp,v retrieving revision 1.47.2.13 retrieving revision 1.47.2.14 diff -C2 -d -r1.47.2.13 -r1.47.2.14 *** PlanView.cpp 19 Mar 2008 01:37:42 -0000 1.47.2.13 --- PlanView.cpp 10 May 2008 22:52:53 -0000 1.47.2.14 *************** *** 1369,1372 **** --- 1369,1375 ---- + // --------------------------------------------------------------------------- + /// ResizeLayout + // void PlanView::ResizeLayout() { *************** *** 1397,1400 **** --- 1400,1406 ---- } + // --------------------------------------------------------------------------- + /// FillRectangle + // void PlanView::FillRectangle(planRectangle_t rect, double zDepth) { *************** *** 1416,1419 **** --- 1422,1428 ---- } + // --------------------------------------------------------------------------- + /// AllowDraw + // void PlanView::AllowDraw(bool val, const char *msg) { *************** *** 1423,1424 **** --- 1432,1441 ---- } + // --------------------------------------------------------------------------- + /// IsElementSelected + // + bool PlanView::IsElementSelected(Element *elem) + { + return false; + } + |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-10 22:51:04
|
Update of /cvsroot/igarden/Garden/source/PlanTool In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv22173/source/PlanTool Modified Files: Tag: Release_branch_v1 PlanDeleteAction.cpp Log Message: Fix problem where elements would look selected when they weren't Index: PlanDeleteAction.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/PlanDeleteAction.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** PlanDeleteAction.cpp 14 Nov 2007 02:49:44 -0000 1.1.2.1 --- PlanDeleteAction.cpp 10 May 2008 22:50:21 -0000 1.1.2.2 *************** *** 87,91 **** --- 87,94 ---- POSTCONDITION(element->GetLayer() != NULL); } + _view->InvalView(); } + + // --------------------------------------------------------------------------- // void PlanDeleteAction::RedoSelf() |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-10 22:50:47
|
Update of /cvsroot/igarden/Garden/source/LayoutDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv22173/source/LayoutDB Modified Files: Tag: Release_branch_v1 Element.h PaintElement.cpp Element.cpp BSPNode.cpp Log Message: Fix problem where elements would look selected when they weren't Index: BSPNode.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/BSPNode.cpp,v retrieving revision 1.28.2.7 retrieving revision 1.28.2.8 diff -C2 -d -r1.28.2.7 -r1.28.2.8 *** BSPNode.cpp 26 Mar 2008 22:23:14 -0000 1.28.2.7 --- BSPNode.cpp 10 May 2008 22:50:40 -0000 1.28.2.8 *************** *** 458,462 **** { elem->Draw(view); ! if(elem->IsSelected()) { elem->DrawAnchorPoints(view); --- 458,462 ---- { elem->Draw(view); ! if(elem->IsSelected(view)) { elem->DrawAnchorPoints(view); Index: Element.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/Element.cpp,v retrieving revision 1.40.2.12 retrieving revision 1.40.2.13 diff -C2 -d -r1.40.2.12 -r1.40.2.13 *** Element.cpp 19 Apr 2008 11:18:17 -0000 1.40.2.12 --- Element.cpp 10 May 2008 22:50:40 -0000 1.40.2.13 *************** *** 59,63 **** : _layer(0) { - _isSelected = false; _visible = true; _creatingTool = NULL; --- 59,62 ---- *************** *** 74,78 **** PRECONDITION(layer != NULL); _layer = layer; - _isSelected = false; _visible = true; _creatingTool = NULL; --- 73,76 ---- *************** *** 87,91 **** : _layer(0) { - _isSelected = false; _visible = true; _bounds.yOffset = top; --- 85,88 ---- *************** *** 464,470 **** /// IsSelected // ! bool Element::IsSelected() { ! return _isSelected; } --- 461,467 ---- /// IsSelected // ! bool Element::IsSelected(PlanView *view) { ! return view->IsElementSelected(this); } *************** *** 988,1011 **** // --------------------------------------------------------------------------- - // void Element::Select( bool doSelect, WritablePlanView* view ) - // --------------------------------------------------------------------------- - // - - - void - Element::Select( bool doSelect, WritablePlanView* view ) - { - PRECONDITION(view != NULL); - _isSelected = doSelect; - RefreshElement(view); - } - - - - - - - - // --------------------------------------------------------------------------- /// RefreshElement // --- 985,988 ---- *************** *** 1119,1123 **** PRECONDITION(layer != NULL); toElement->_layer = layer; - toElement->_isSelected = _isSelected; count = _overlapPoints.Length(); for(n = 0; n < count; n++) --- 1096,1099 ---- Index: Element.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/Element.h,v retrieving revision 1.38.2.13 retrieving revision 1.38.2.14 diff -C2 -d -r1.38.2.13 -r1.38.2.14 *** Element.h 4 May 2008 11:38:47 -0000 1.38.2.13 --- Element.h 10 May 2008 22:50:31 -0000 1.38.2.14 *************** *** 156,160 **** static void RegisterElementClasses(); #pragma mark Test ! bool IsSelected(); virtual bool IsPointOver(planPoint_t point, PlanView* view); bool IntersectsUpdateRegion(PlanView* view); --- 156,160 ---- static void RegisterElementClasses(); #pragma mark Test ! bool IsSelected(PlanView *view); virtual bool IsPointOver(planPoint_t point, PlanView* view); bool IntersectsUpdateRegion(PlanView* view); *************** *** 216,220 **** virtual void* CloneFromTemplate(); virtual planRectangle_t GetBoundingRectangle() = 0; - virtual void Select(bool doSelect, WritablePlanView* view); virtual void RefreshElement(PlanView* intoView); virtual void RefreshContent(PlanView* intoView); --- 216,219 ---- *************** *** 249,253 **** // attributes Layer* _layer; - bool _isSelected; XGDynArray<overlapPoint_t> _overlapPoints; XGDynArray<warningEntry_t> _warnings; --- 248,251 ---- Index: PaintElement.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/PaintElement.cpp,v retrieving revision 1.26.2.9 retrieving revision 1.26.2.10 diff -C2 -d -r1.26.2.9 -r1.26.2.10 *** PaintElement.cpp 26 Mar 2008 22:21:35 -0000 1.26.2.9 --- PaintElement.cpp 10 May 2008 22:50:38 -0000 1.26.2.10 *************** *** 227,231 **** _path->DrawBounds(view); } ! if(ShouldDrawCenterline() || IsSelected()) { view->SetLineType(view->GetDefaultPaintLineType()); --- 227,231 ---- _path->DrawBounds(view); } ! if(ShouldDrawCenterline() || IsSelected(view)) { view->SetLineType(view->GetDefaultPaintLineType()); |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-10 22:48:18
|
Update of /cvsroot/igarden/Garden/source/LayoutDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv20534/source/LayoutDB Modified Files: Tag: Release_branch_v1 UserTextBox.h UserTextBox.cpp Log Message: Fix problem where elements would look selected when they weren't Index: UserTextBox.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/UserTextBox.h,v retrieving revision 1.6.2.1 retrieving revision 1.6.2.2 diff -C2 -d -r1.6.2.1 -r1.6.2.2 *** UserTextBox.h 26 Mar 2008 22:21:36 -0000 1.6.2.1 --- UserTextBox.h 10 May 2008 22:48:21 -0000 1.6.2.2 *************** *** 44,48 **** virtual void DrawPopupInfo(); void DoKey(long charVal, long modifiers); - virtual void Select(bool doSelect, WritablePlanView* view); void Activate(); void Deactivate(); --- 44,47 ---- Index: UserTextBox.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/UserTextBox.cpp,v retrieving revision 1.11.2.5 retrieving revision 1.11.2.6 diff -C2 -d -r1.11.2.5 -r1.11.2.6 *** UserTextBox.cpp 9 May 2008 13:30:43 -0000 1.11.2.5 --- UserTextBox.cpp 10 May 2008 22:48:21 -0000 1.11.2.6 *************** *** 266,278 **** // --------------------------------------------------------------------------- - // void UserTextBox::Select( bool doSelect, WritablePlanView* view ) - // - void UserTextBox::Select( bool doSelect, WritablePlanView* view ) - { - Element::Select(doSelect, view); - } - - - // --------------------------------------------------------------------------- // void UserTextBox::Activate() // --- 266,269 ---- |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-10 13:26:17
|
Update of /cvsroot/igarden/Garden/source/LayoutDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv17635/source/LayoutDB Modified Files: Tag: Release_branch_v1 ArcPath.cpp Path.h PathElement.cpp Path.cpp Log Message: Make it easier to click on arc paths Index: Path.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/Path.cpp,v retrieving revision 1.67.2.10 retrieving revision 1.67.2.11 diff -C2 -d -r1.67.2.10 -r1.67.2.11 *** Path.cpp 19 Apr 2008 11:21:25 -0000 1.67.2.10 --- Path.cpp 10 May 2008 13:26:21 -0000 1.67.2.11 *************** *** 1311,1316 **** bool Path::PointOnLineSegment( planPoint_t line1, planPoint_t line2, planPoint_t point, planScale_t scale ) { - double len, U, dx, dy, distance; - planPoint_t intersect; UInt32 width; --- 1311,1314 ---- *************** *** 1322,1326 **** --- 1320,1332 ---- else width = (UInt32)scale*3; + + return PointNearLineSegment(line1, line2, point, width); + } + bool Path::PointNearLineSegment( planPoint_t line1, planPoint_t line2, planPoint_t point, planLength_t near ) + { + planPoint_t intersect; + double len, U, dx, dy, distance; + dx = line2.xOffset - line1.xOffset; dy = line2.yOffset - line1.yOffset; *************** *** 1349,1353 **** } ! return (distance < width); } --- 1355,1359 ---- } ! return (distance < near); } Index: PathElement.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/PathElement.cpp,v retrieving revision 1.40.2.5 retrieving revision 1.40.2.6 diff -C2 -d -r1.40.2.5 -r1.40.2.6 *** PathElement.cpp 17 Apr 2008 10:51:06 -0000 1.40.2.5 --- PathElement.cpp 10 May 2008 13:26:20 -0000 1.40.2.6 *************** *** 297,300 **** --- 297,301 ---- { PRECONDITION(_path != NULL); + // Scale is only used for determining how much slop to allow, so IsPointWithinPath() doesn't need it. if(_path->IsPointOnPath(point, view->GetScale())) return true; Index: ArcPath.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/ArcPath.cpp,v retrieving revision 1.19.2.9 retrieving revision 1.19.2.10 diff -C2 -d -r1.19.2.9 -r1.19.2.10 *** ArcPath.cpp 26 Mar 2008 22:23:11 -0000 1.19.2.9 --- ArcPath.cpp 10 May 2008 13:26:20 -0000 1.19.2.10 *************** *** 454,469 **** bool ArcPath::IsPointWithinPath( planPoint_t point ) { ! planLength_t dx, dy; planPoint_t center; if(_isCircle) { ! center = GetCenter(); ! dx = point.xOffset - center.xOffset; ! dy = point.yOffset - center.yOffset; ! return((_radius*_radius) > ((dx*dx)+(dy*dy))); } - else - return false; } --- 454,481 ---- bool ArcPath::IsPointWithinPath( planPoint_t point ) { ! planLength_t dx, dy, allowance; planPoint_t center; + bool result; + long i, count; + + center = GetCenter(); + dx = point.xOffset - center.xOffset; + dy = point.yOffset - center.yOffset; if(_isCircle) + return ((_radius*_radius) > ((dx*dx)+(dy*dy))); + else { ! dx = _pathPoints[1].xOffset - _pathPoints[0].xOffset; ! dy = _pathPoints[1].yOffset - _pathPoints[0].yOffset; ! allowance = sqrt((dx*dx)+(dy*dy)); ! ! count = _pathPoints.Length(); ! for(i = 0, result = false; i < count && !result; i++) ! { ! result = Path::PointNearLineSegment(center, _pathPoints[i], point, allowance); ! } ! return result; } } Index: Path.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/Path.h,v retrieving revision 1.38.2.5 retrieving revision 1.38.2.6 diff -C2 -d -r1.38.2.5 -r1.38.2.6 *** Path.h 26 Mar 2008 22:18:45 -0000 1.38.2.5 --- Path.h 10 May 2008 13:26:20 -0000 1.38.2.6 *************** *** 168,171 **** --- 168,172 ---- bool PointOnLineSegment(UInt32 indexA, UInt32 indexB, planPoint_t testPoint, planScale_t scale); bool PointOnLineSegment( planPoint_t a, planPoint_t b, planPoint_t testPoint, planScale_t scale ); + bool PointNearLineSegment( planPoint_t line1, planPoint_t line2, planPoint_t point, planLength_t distance ); bool IsPointWithinPolygon( planPoint_t point ); planLength_t MaterialSpacing(); |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-10 03:50:20
|
Update of /cvsroot/igarden/CommonSource/YAAFExtensions In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv3046/YAAFExtensions Modified Files: Tag: Release_branch_v1 RGGLSVGDraw.cpp Log Message: XFlexRep wasn't working Index: RGGLSVGDraw.cpp =================================================================== RCS file: /cvsroot/igarden/CommonSource/YAAFExtensions/RGGLSVGDraw.cpp,v retrieving revision 1.26.2.24 retrieving revision 1.26.2.25 diff -C2 -d -r1.26.2.24 -r1.26.2.25 *** RGGLSVGDraw.cpp 18 Apr 2008 02:38:31 -0000 1.26.2.24 --- RGGLSVGDraw.cpp 10 May 2008 03:50:19 -0000 1.26.2.25 *************** *** 1335,1339 **** long xReps; ! if(_midXType == kMiddleRep || _midYType == kMiddleFlexRep) { double midXPlan; --- 1335,1339 ---- long xReps; ! if(_midXType == kMiddleRep || _midXType == kMiddleFlexRep) { double midXPlan; |
|
From: Jeffrey B. <jlb...@us...> - 2008-05-10 02:52:44
|
Update of /cvsroot/igarden/Garden/source/Preferences In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv27051/source/Preferences Modified Files: Tag: Release_branch_v1 DocumentTags.cpp DocumentTags.h Log Message: Font picker in prferences now changes the list view font in real time. Index: DocumentTags.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/Preferences/DocumentTags.h,v retrieving revision 1.10.2.3 retrieving revision 1.10.2.4 diff -C2 -d -r1.10.2.3 -r1.10.2.4 *** DocumentTags.h 22 Aug 2007 13:02:00 -0000 1.10.2.3 --- DocumentTags.h 10 May 2008 02:52:17 -0000 1.10.2.4 *************** *** 60,63 **** --- 60,65 ---- void ParseXML(XGXMLObject *obj); DocumentTags* Clone(); + void CopyGlobalTags(); + /***/ static DocumentTags* MakeTagSaver(); Index: DocumentTags.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/Preferences/DocumentTags.cpp,v retrieving revision 1.16.2.4 retrieving revision 1.16.2.5 diff -C2 -d -r1.16.2.4 -r1.16.2.5 *** DocumentTags.cpp 19 Mar 2008 01:54:01 -0000 1.16.2.4 --- DocumentTags.cpp 10 May 2008 02:52:17 -0000 1.16.2.5 *************** *** 42,49 **** // AddReceiver(GlobalTags::_globalPrefs); _compat = NULL; - GlobalTags::_globalPrefs->CopyAllFieldsTo(this); _allowAllProps = false; } void DocumentTags::ParseXML(XGXMLObject *obj) { --- 42,53 ---- // AddReceiver(GlobalTags::_globalPrefs); _compat = NULL; _allowAllProps = false; } + void DocumentTags::CopyGlobalTags() + { + GlobalTags::_globalPrefs->CopyAllFieldsTo(this); + } + void DocumentTags::ParseXML(XGXMLObject *obj) { *************** *** 133,136 **** --- 137,141 ---- PRECONDITION(_compat != NULL); // Needs to be written for non-db result = new DocumentTags(_compat->GetFile()); + result->CopyGlobalTags(); //!!! if(_compat) // _compat->CopyTo(result); *************** *** 147,150 **** --- 152,156 ---- result = new DocumentTags(); + result->CopyGlobalTags(); result->_allowAllProps = true; |