diff options
author | joye <joye> | 2014-07-09 18:38:16 (GMT) |
---|---|---|
committer | joye <joye> | 2014-07-09 18:38:16 (GMT) |
commit | 2d5240efc51590d057c43e5cd36bb706d2c527c3 (patch) | |
tree | 186cb4d3d0ec7706430e8e897c3a1ccbc489615b /src/bltGrLegd.C | |
parent | f96f755cc828847cdbbc76daec69c320f567b5ce (diff) | |
download | blt-2d5240efc51590d057c43e5cd36bb706d2c527c3.zip blt-2d5240efc51590d057c43e5cd36bb706d2c527c3.tar.gz blt-2d5240efc51590d057c43e5cd36bb706d2c527c3.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'src/bltGrLegd.C')
-rw-r--r-- | src/bltGrLegd.C | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/src/bltGrLegd.C b/src/bltGrLegd.C index 646fd9c..4047309 100644 --- a/src/bltGrLegd.C +++ b/src/bltGrLegd.C @@ -266,7 +266,7 @@ void Legend::map(int plotWidth, int plotHeight) int maxWidth =0; int maxHeight =0; TextStyle ts(graphPtr_, &ops->style); - for (ChainLink link=Chain_FirstLink(graphPtr_->elements_.displayList); + for (ChainLink* link = Chain_FirstLink(graphPtr_->elements_.displayList); link; link = Chain_NextLink(link)) { Element* elemPtr = (Element*)Chain_GetValue(link); ElementOptions* elemOps = (ElementOptions*)elemPtr->ops(); @@ -374,7 +374,7 @@ void Legend::map(int plotWidth, int plotHeight) int row =0; int col =0; int count =0; - for (ChainLink link=Chain_FirstLink(graphPtr_->elements_.displayList); + for (ChainLink* link = Chain_FirstLink(graphPtr_->elements_.displayList); link; link = Chain_NextLink(link)) { Element* elemPtr = (Element*)Chain_GetValue(link); count++; @@ -454,7 +454,7 @@ void Legend::draw(Drawable drawable) int yStart = y; TextStyle ts(graphPtr_, &ops->style); - for (ChainLink link=Chain_FirstLink(graphPtr_->elements_.displayList); + for (ChainLink* link = Chain_FirstLink(graphPtr_->elements_.displayList); link; link = Chain_NextLink(link)) { Element* elemPtr = (Element*)Chain_GetValue(link); ElementOptions* elemOps = (ElementOptions*)elemPtr->ops(); @@ -574,7 +574,7 @@ void Legend::print(PSOutput* psPtr) double yStart = y; TextStyle ts(graphPtr_, &ops->style); - for (ChainLink link=Chain_FirstLink(graphPtr_->elements_.displayList); + for (ChainLink* link = Chain_FirstLink(graphPtr_->elements_.displayList); link; link = Chain_NextLink(link)) { Element* elemPtr = (Element*)Chain_GetValue(link); ElementOptions* elemOps = (ElementOptions*)elemPtr->ops(); @@ -762,7 +762,7 @@ void Legend::selectElement(Element* elemPtr) int isNew; Tcl_HashEntry* hPtr = Tcl_CreateHashEntry(&selectTable_, elemPtr, &isNew); if (isNew) { - ChainLink link = Chain_Append(selected_, elemPtr); + ChainLink* link = Chain_Append(selected_, elemPtr); Tcl_SetHashValue(hPtr, link); } } @@ -771,7 +771,7 @@ void Legend::deselectElement(Element* elemPtr) { Tcl_HashEntry* hPtr = Tcl_FindHashEntry(&selectTable_, elemPtr); if (hPtr) { - ChainLink link = (ChainLink)Tcl_GetHashValue(hPtr); + ChainLink* link = (ChainLink*)Tcl_GetHashValue(hPtr); Chain_DeleteLink(selected_, link); Tcl_DeleteHashEntry(hPtr); } @@ -781,8 +781,7 @@ void Legend::deselectElement(Element* elemPtr) int Legend::selectRange(Element *fromPtr, Element *toPtr) { if (Chain_IsBefore(fromPtr->link, toPtr->link)) { - for (ChainLink link=fromPtr->link; link; - link=Chain_NextLink(link)) { + for (ChainLink* link = fromPtr->link; link; link = Chain_NextLink(link)) { Element* elemPtr = (Element*)Chain_GetValue(link); selectEntry(elemPtr); if (link == toPtr->link) @@ -790,8 +789,7 @@ int Legend::selectRange(Element *fromPtr, Element *toPtr) } } else { - for (ChainLink link=fromPtr->link; link; - link=Chain_PrevLink(link)) { + for (ChainLink* link = fromPtr->link; link; link = Chain_PrevLink(link)) { Element* elemPtr = (Element*)Chain_GetValue(link); selectEntry(elemPtr); if (link == toPtr->link) @@ -875,7 +873,7 @@ Element* Legend::getNextRow(Element* focusPtr) { int col = focusPtr->col_; int row = focusPtr->row_ + 1; - for (ChainLink link=focusPtr->link; link; link=Chain_NextLink(link)) { + for (ChainLink* link = focusPtr->link; link; link = Chain_NextLink(link)) { Element* elemPtr = (Element*)Chain_GetValue(link); ElementOptions* elemOps = (ElementOptions*)elemPtr->ops(); @@ -892,7 +890,7 @@ Element* Legend::getNextColumn(Element* focusPtr) { int col = focusPtr->col_ + 1; int row = focusPtr->row_; - for (ChainLink link=focusPtr->link; link; link=Chain_NextLink(link)) { + for (ChainLink* link = focusPtr->link; link; link = Chain_NextLink(link)) { Element* elemPtr = (Element*)Chain_GetValue(link); ElementOptions* elemOps = (ElementOptions*)elemPtr->ops(); @@ -909,7 +907,7 @@ Element* Legend::getPreviousRow(Element* focusPtr) { int col = focusPtr->col_; int row = focusPtr->row_ - 1; - for (ChainLink link=focusPtr->link; link; link=Chain_PrevLink(link)) { + for (ChainLink* link = focusPtr->link; link; link = Chain_PrevLink(link)) { Element* elemPtr = (Element*)Chain_GetValue(link); ElementOptions* elemOps = (ElementOptions*)elemPtr->ops(); @@ -926,7 +924,7 @@ Element* Legend::getPreviousColumn(Element* focusPtr) { int col = focusPtr->col_ - 1; int row = focusPtr->row_; - for (ChainLink link=focusPtr->link; link; link=Chain_PrevLink(link)) { + for (ChainLink* link = focusPtr->link; link; link = Chain_PrevLink(link)) { Element* elemPtr = (Element*)Chain_GetValue(link); ElementOptions* elemOps = (ElementOptions*)elemPtr->ops(); @@ -941,8 +939,8 @@ Element* Legend::getPreviousColumn(Element* focusPtr) Element* Legend::getFirstElement() { - for (ChainLink link=Chain_FirstLink(graphPtr_->elements_.displayList); - link; link=Chain_NextLink(link)) { + for (ChainLink* link = Chain_FirstLink(graphPtr_->elements_.displayList); + link; link = Chain_NextLink(link)) { Element* elemPtr = (Element*)Chain_GetValue(link); ElementOptions* elemOps = (ElementOptions*)elemPtr->ops(); if (elemOps->label) @@ -953,8 +951,8 @@ Element* Legend::getFirstElement() Element* Legend::getLastElement() { - for (ChainLink link=Chain_LastLink(graphPtr_->elements_.displayList); - link; link=Chain_PrevLink(link)) { + for (ChainLink* link = Chain_LastLink(graphPtr_->elements_.displayList); + link; link = Chain_PrevLink(link)) { Element* elemPtr = (Element*)Chain_GetValue(link); ElementOptions* elemOps = (ElementOptions*)elemPtr->ops(); if (elemOps->label) @@ -987,7 +985,8 @@ ClientData Legend::pickEntry(int xx, int yy, ClassId* classIdPtr) // Legend entries are stored in bottom-to-top if (nn < nEntries_) { int count = 0; - for (ChainLink link = Chain_FirstLink(graphPtr_->elements_.displayList); link; link = Chain_NextLink(link)) { + for (ChainLink* link = Chain_FirstLink(graphPtr_->elements_.displayList); + link; link = Chain_NextLink(link)) { Element* elemPtr = (Element*)Chain_GetValue(link); ElementOptions* elemOps = (ElementOptions*)elemPtr->ops(); if (elemOps->label) { @@ -1020,7 +1019,7 @@ static int SelectionProc(ClientData clientData, int offset, char *buffer, Tcl_DString dString; Tcl_DStringInit(&dString); if (legendPtr->flags & SELECT_SORTED) { - for (ChainLink link=Chain_FirstLink(legendPtr->selected_); + for (ChainLink* link=Chain_FirstLink(legendPtr->selected_); link; link = Chain_NextLink(link)) { Element* elemPtr = (Element*)Chain_GetValue(link); Tcl_DStringAppend(&dString, elemPtr->name_, -1); @@ -1028,7 +1027,7 @@ static int SelectionProc(ClientData clientData, int offset, char *buffer, } } else { - for (ChainLink link=Chain_FirstLink(graphPtr->elements_.displayList); + for (ChainLink* link=Chain_FirstLink(graphPtr->elements_.displayList); link; link = Chain_NextLink(link)) { Element* elemPtr = (Element*)Chain_GetValue(link); if (legendPtr->entryIsSelected(elemPtr)) { |