Commit 6d582fed authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

- Make row number be zero-based.

- Improvements to dumping functions to not dump out fields that may not have been filled in.
parent 18fe91d8
...@@ -134,7 +134,7 @@ typedef struct ...@@ -134,7 +134,7 @@ typedef struct
SIZE offChild; /* x,y offset if child is not FIXEDSIZE */ SIZE offChild; /* x,y offset if child is not FIXEDSIZE */
UINT uMinHeight; UINT uMinHeight;
INT iRow; /* row this band assigned to */ INT iRow; /* zero-based index of the row this band assigned to */
UINT fStatus; /* status flags, reset only by _Validate */ UINT fStatus; /* status flags, reset only by _Validate */
UINT fDraw; /* drawing flags, reset only by _Layout */ UINT fDraw; /* drawing flags, reset only by _Layout */
UINT uCDret; /* last return from NM_CUSTOMDRAW */ UINT uCDret; /* last return from NM_CUSTOMDRAW */
...@@ -360,8 +360,14 @@ static VOID ...@@ -360,8 +360,14 @@ static VOID
REBAR_DumpBandInfo( LPREBARBANDINFOA pB) REBAR_DumpBandInfo( LPREBARBANDINFOA pB)
{ {
if( !TRACE_ON(rebar) ) return; if( !TRACE_ON(rebar) ) return;
TRACE("band info: ID=%u, size=%u, child=%p, clrF=0x%06lx, clrB=0x%06lx\n", TRACE("band info: ");
pB->wID, pB->cbSize, pB->hwndChild, pB->clrFore, pB->clrBack); if (pB->fMask & RBBIM_ID);
TRACE("ID=%u, ", pB->wID);
TRACE("size=%u, child=%p", pB->cbSize, pB->hwndChild);
if (pB->fMask & RBBIM_COLORS)
TRACE(", clrF=0x%06lx, clrB=0x%06lx", pB->clrFore, pB->clrBack);
TRACE("\n");
TRACE("band info: mask=0x%08x (%s)\n", pB->fMask, REBAR_FmtMask(pB->fMask)); TRACE("band info: mask=0x%08x (%s)\n", pB->fMask, REBAR_FmtMask(pB->fMask));
if (pB->fMask & RBBIM_STYLE) if (pB->fMask & RBBIM_STYLE)
TRACE("band info: style=0x%08x (%s)\n", pB->fStyle, REBAR_FmtStyle(pB->fStyle)); TRACE("band info: style=0x%08x (%s)\n", pB->fStyle, REBAR_FmtStyle(pB->fStyle));
...@@ -403,8 +409,14 @@ REBAR_DumpBand (REBAR_INFO *iP) ...@@ -403,8 +409,14 @@ REBAR_DumpBand (REBAR_INFO *iP)
(iP->NtfUnicode)?"TRUE":"FALSE", (iP->DoRedraw)?"TRUE":"FALSE"); (iP->NtfUnicode)?"TRUE":"FALSE", (iP->DoRedraw)?"TRUE":"FALSE");
for (i = 0; i < iP->uNumBands; i++) { for (i = 0; i < iP->uNumBands; i++) {
pB = &iP->bands[i]; pB = &iP->bands[i];
TRACE("band # %u: ID=%u, child=%p, row=%u, clrF=0x%06lx, clrB=0x%06lx\n", TRACE("band # %u:", i);
i, pB->wID, pB->hwndChild, pB->iRow, pB->clrFore, pB->clrBack); if (pB->fMask & RBBIM_ID);
TRACE(" ID=%u", pB->wID);
if (pB->fMask & RBBIM_CHILD)
TRACE(" child=%p", pB->hwndChild);
if (pB->fMask & RBBIM_COLORS)
TRACE(" clrF=0x%06lx clrB=0x%06lx", pB->clrFore, pB->clrBack);
TRACE("\n");
TRACE("band # %u: mask=0x%08x (%s)\n", i, pB->fMask, REBAR_FmtMask(pB->fMask)); TRACE("band # %u: mask=0x%08x (%s)\n", i, pB->fMask, REBAR_FmtMask(pB->fMask));
if (pB->fMask & RBBIM_STYLE) if (pB->fMask & RBBIM_STYLE)
TRACE("band # %u: style=0x%08x (%s)\n", TRACE("band # %u: style=0x%08x (%s)\n",
...@@ -1419,7 +1431,7 @@ REBAR_Layout (REBAR_INFO *infoPtr, LPRECT lpRect, BOOL notify, BOOL resetclient) ...@@ -1419,7 +1431,7 @@ REBAR_Layout (REBAR_INFO *infoPtr, LPRECT lpRect, BOOL notify, BOOL resetclient)
clientcx, clientcy, adjcx, adjcy); clientcx, clientcy, adjcx, adjcy);
x = initx; x = initx;
y = inity; y = inity;
row = 1; row = 0;
cx = 0; cx = 0;
mcy = 0; mcy = 0;
rowstart = 0; rowstart = 0;
...@@ -1560,7 +1572,7 @@ REBAR_Layout (REBAR_INFO *infoPtr, LPRECT lpRect, BOOL notify, BOOL resetclient) ...@@ -1560,7 +1572,7 @@ REBAR_Layout (REBAR_INFO *infoPtr, LPRECT lpRect, BOOL notify, BOOL resetclient)
} }
if (infoPtr->uNumBands) if (infoPtr->uNumBands)
infoPtr->uNumRows = row; infoPtr->uNumRows = row + 1;
/* ******* End Phase 1 - all bands on row at minimum size ******* */ /* ******* End Phase 1 - all bands on row at minimum size ******* */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment