[Igarden-commit] Garden/source/PlanTool ActiveMaterial.h, 1.10.2.5, 1.10.2.6 ActiveMaterial.cpp, 1.
Status: Beta
Brought to you by:
jlbedell
|
From: Jeffrey B. <jlb...@us...> - 2007-02-09 02:42:12
|
Update of /cvsroot/igarden/Garden/source/PlanTool In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv22165 Modified Files: Tag: Release_branch_v1 ActiveMaterial.h ActiveMaterial.cpp Log Message: Combine copyright & warning strings into one annotation view. Index: ActiveMaterial.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/ActiveMaterial.cpp,v retrieving revision 1.45.2.15 retrieving revision 1.45.2.16 diff -C2 -d -r1.45.2.15 -r1.45.2.16 *** ActiveMaterial.cpp 9 Feb 2007 01:13:06 -0000 1.45.2.15 --- ActiveMaterial.cpp 9 Feb 2007 02:42:10 -0000 1.45.2.16 *************** *** 50,54 **** #define POPUP_HEIGHT 20 #define NAME_HEIGHT 26 ! #define WARNING_HEIGHT 12 #define BORDER_WIDTH 2 --- 50,54 ---- #define POPUP_HEIGHT 20 #define NAME_HEIGHT 26 ! #define WARNING_HEIGHT 13 #define BORDER_WIDTH 2 *************** *** 100,104 **** XGSViewInitRecord popupInfo, imageInfo, catPopInfo; struct XGSTextInitRecord staticInfo, nameInfo, warningInfo; ! RGHTextInitRecord copyrightInfo; Point myPaneSize; long messageType, nameType, buttonType; --- 100,104 ---- XGSViewInitRecord popupInfo, imageInfo, catPopInfo; struct XGSTextInitRecord staticInfo, nameInfo, warningInfo; ! RGHTextInitRecord annotationInfo; Point myPaneSize; long messageType, nameType, buttonType; *************** *** 170,202 **** _popup = new XGPopControl(this, popupInfo, kActiveMenuFont); ! ! warningInfo.v = popupInfo; ! warningInfo.v.fViewID = kMaterialWarningText; ! warningInfo.v.fVisible = true; ! warningInfo.v.fEnabled = true; ! warningInfo.v.fAutoLeft = BORDER_WIDTH; ! warningInfo.v.fViewID = 'AmSt'; ! warningInfo.font = 134; ! warningInfo.v.fAutoLeft = 5; ! warningInfo.v.fAutoTop = popupInfo.fAutoTop - WARNING_HEIGHT; ! warningInfo.v.fAutoRight = -5; ! warningInfo.v.fAutoBottom = warningInfo.v.fAutoTop + WARNING_HEIGHT; ! strcpy(nameInfo.text, ""); ! _warningText = new XGStaticText(this, warningInfo); ! _warningText->HideView(); ! ! copyrightInfo.v = popupInfo; ! copyrightInfo.v.fViewID = kMaterialCopyrightText; ! copyrightInfo.v.fVisible = true; ! copyrightInfo.v.fEnabled = true; ! copyrightInfo.v.fAutoLeft = BORDER_WIDTH; ! copyrightInfo.v.fViewID = 'AmSt'; ! copyrightInfo.font = 146; ! copyrightInfo.color = -1; ! copyrightInfo.v.fAutoTop = warningInfo.v.fAutoTop - (WARNING_HEIGHT*3); ! copyrightInfo.v.fAutoBottom = copyrightInfo.v.fAutoTop + (WARNING_HEIGHT*3); strcpy(nameInfo.text, ""); ! _copyrightText = new RGHypertextView(this, copyrightInfo); ! _copyrightText->ShowView(); nameInfo.v = popupInfo; --- 170,186 ---- _popup = new XGPopControl(this, popupInfo, kActiveMenuFont); ! annotationInfo.v = popupInfo; ! annotationInfo.v.fViewID = kMaterialCopyrightText; ! annotationInfo.v.fVisible = true; ! annotationInfo.v.fEnabled = true; ! annotationInfo.v.fAutoLeft = BORDER_WIDTH; ! annotationInfo.v.fViewID = 'AmSt'; ! annotationInfo.font = 146; ! annotationInfo.color = -1; ! annotationInfo.v.fAutoTop = popupInfo.fAutoTop - (WARNING_HEIGHT*4); ! annotationInfo.v.fAutoBottom = annotationInfo.v.fAutoTop + (WARNING_HEIGHT*4); strcpy(nameInfo.text, ""); ! _annotationText = new RGHypertextView(this, annotationInfo); ! _annotationText->ShowView(); nameInfo.v = popupInfo; *************** *** 207,211 **** nameInfo.v.fViewID = 'AmSt'; nameInfo.font = nameType; ! nameInfo.v.fAutoTop = copyrightInfo.v.fAutoTop - NAME_HEIGHT; nameInfo.v.fAutoBottom = nameInfo.v.fAutoTop + NAME_HEIGHT; strcpy(nameInfo.text, ""); --- 191,195 ---- nameInfo.v.fViewID = 'AmSt'; nameInfo.font = nameType; ! nameInfo.v.fAutoTop = annotationInfo.v.fAutoTop - NAME_HEIGHT; nameInfo.v.fAutoBottom = nameInfo.v.fAutoTop + NAME_HEIGHT; strcpy(nameInfo.text, ""); *************** *** 268,271 **** --- 252,256 ---- _topPalette = NULL; _needsUIUpdate = false; + _showWarning = false; } *************** *** 433,448 **** copyrightStr.SetCString(""); by = info.GetCreatedBy(); ! if(by) { ! copyrightStr += "Picture: "; copyrightStr += by; } copyright = info.GetCopyright(); ! if(copyright) { copyrightStr += " using "; copyrightStr += copyright; } ! _copyrightText->SetText(copyrightStr.c_str()); if(fileName.Length() != 0) --- 418,461 ---- copyrightStr.SetCString(""); by = info.GetCreatedBy(); ! if(by && *by != '\0') { ! copyrightStr += "<b>Picture:</b> "; copyrightStr += by; } copyright = info.GetCopyright(); ! if(copyright && *copyright != '\0') { copyrightStr += " using "; copyrightStr += copyright; } ! ! InfoSupplier *supplier; ! XGUUID supplierID = info.GetSupplier(); ! supplier = SourceMaterialFile::GetSourceDatabase()->LookupSupplier(supplierID); ! if(supplier) ! { ! String str = supplier->GetSiteURL(); ! ! if(!str.empty()) ! { ! String substr; ! ! copyrightStr += " on <a href=\""; ! copyrightStr += str; ! copyrightStr += "\">"; ! if(str.left(7) == String("http://")) ! { ! substr = str.right(str.Length()-7); ! copyrightStr += substr; ! } ! else ! copyrightStr += str; ! copyrightStr += "</a>"; ! } ! } ! ! if(_showWarning) ! copyrightStr += "<br><b>May not be an exact match.</b>"; ! _annotationText->SetText(copyrightStr.c_str()); if(fileName.Length() != 0) *************** *** 481,485 **** _drawing->Deactivate(); _drawing->HideView(); - _warningText->HideView(); if(_image->SetSource(fileSpec) == noErr) { --- 494,497 ---- *************** *** 498,502 **** { DisplayMessage("No image available"); - _warningText->HideView(); _drawing->Deactivate(); _image->ShowView(); --- 510,513 ---- *************** *** 568,578 **** { _nameText->SetTitle(name.c_str()); ! if(likeness == kPictureMayDiffer) ! { ! _warningText->SetTitle("May not be an exact match."); ! _warningText->ShowView(); ! } ! else ! _warningText->HideView(); } --- 579,583 ---- { _nameText->SetTitle(name.c_str()); ! _showWarning = (likeness == kPictureMayDiffer); } Index: ActiveMaterial.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/ActiveMaterial.h,v retrieving revision 1.10.2.5 retrieving revision 1.10.2.6 diff -C2 -d -r1.10.2.5 -r1.10.2.6 *** ActiveMaterial.h 9 Feb 2007 01:13:06 -0000 1.10.2.5 --- ActiveMaterial.h 9 Feb 2007 02:42:10 -0000 1.10.2.6 *************** *** 112,117 **** XGStaticText* _message; XGStaticText* _nameText; ! XGStaticText* _warningText; ! RGHypertextView* _copyrightText; materialArray_t _currentPlotItems; UInt32 _currentItem; --- 112,116 ---- XGStaticText* _message; XGStaticText* _nameText; ! RGHypertextView* _annotationText; materialArray_t _currentPlotItems; UInt32 _currentItem; *************** *** 123,126 **** --- 122,126 ---- uint32 _paletteGroup; bool _needsUIUpdate; + bool _showWarning; materialID_t _newUpdateID; /*****/ |