diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-02 20:55:18 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-02 20:55:18 +0000 |
commit | 78c0815c4118fe24ab78cce2dc48a6232dcd824a (patch) | |
tree | 8512c50df70b8dd80c919e88ade3419207c95956 /plugins/Clist_nicer/coolsb | |
parent | ce816d83a8c75808e0eb06832592bffefe4a8dc4 (diff) |
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer/coolsb')
-rw-r--r-- | plugins/Clist_nicer/coolsb/coolsblib.cpp | 94 | ||||
-rw-r--r-- | plugins/Clist_nicer/coolsb/coolscroll.cpp | 38 |
2 files changed, 66 insertions, 66 deletions
diff --git a/plugins/Clist_nicer/coolsb/coolsblib.cpp b/plugins/Clist_nicer/coolsb/coolsblib.cpp index ac9ee2a360..b8c986b120 100644 --- a/plugins/Clist_nicer/coolsb/coolsblib.cpp +++ b/plugins/Clist_nicer/coolsb/coolsblib.cpp @@ -47,7 +47,7 @@ SCROLLBAR *GetScrollBarFromHwnd(HWND hwnd, UINT nBar) {
SCROLLWND *sw = GetScrollWndFromHwnd(hwnd);
- if(!sw) return 0;
+ if (!sw) return 0;
if(nBar == SB_HORZ)
return &sw->sbarHorz;
@@ -285,10 +285,10 @@ BOOL WINAPI CoolSB_EnableScrollBar (HWND hwnd, int wSBflags, UINT wArrows) UINT oldstate;
BOOL bFailed = FALSE;
- if(!CoolSB_IsCoolScrollEnabled(hwnd))
+ if (!CoolSB_IsCoolScrollEnabled(hwnd))
return EnableScrollBar(hwnd, wSBflags, wArrows);
- if((wSBflags == SB_HORZ || wSBflags == SB_BOTH) &&
+ if ((wSBflags == SB_HORZ || wSBflags == SB_BOTH) &&
(sbar = GetScrollBarFromHwnd(hwnd, SB_HORZ)))
{
oldstate = sbar->fScrollFlags;
@@ -301,7 +301,7 @@ BOOL WINAPI CoolSB_EnableScrollBar (HWND hwnd, int wSBflags, UINT wArrows) }
- if((wSBflags == SB_VERT || wSBflags == SB_BOTH) &&
+ if ((wSBflags == SB_VERT || wSBflags == SB_BOTH) &&
(sbar = GetScrollBarFromHwnd(hwnd, SB_VERT)))
{
oldstate = sbar->fScrollFlags;
@@ -327,10 +327,10 @@ BOOL WINAPI CoolSB_GetScrollInfo (HWND hwnd, int fnBar, LPSCROLLINFO lpsi) SCROLLINFO *mysi;
BOOL copied = FALSE;
- if(!lpsi)
+ if (!lpsi)
return FALSE;
- if(!(mysi = GetScrollInfoFromHwnd(hwnd, fnBar)))
+ if (!(mysi = GetScrollInfoFromHwnd(hwnd, fnBar)))
{
return GetScrollInfo(hwnd, fnBar, lpsi);
}
@@ -367,7 +367,7 @@ int WINAPI CoolSB_GetScrollPos (HWND hwnd, int nBar) {
SCROLLINFO *mysi;
- if(!(mysi = GetScrollInfoFromHwnd(hwnd, nBar)))
+ if (!(mysi = GetScrollInfoFromHwnd(hwnd, nBar)))
return GetScrollPos(hwnd, nBar);
return mysi->nPos;
@@ -377,10 +377,10 @@ BOOL WINAPI CoolSB_GetScrollRange (HWND hwnd, int nBar, LPINT lpMinPos, LPINT lp {
SCROLLINFO *mysi;
- if(!lpMinPos || !lpMaxPos)
+ if (!lpMinPos || !lpMaxPos)
return FALSE;
- if(!(mysi = GetScrollInfoFromHwnd(hwnd, nBar)))
+ if (!(mysi = GetScrollInfoFromHwnd(hwnd, nBar)))
return GetScrollRange(hwnd, nBar, lpMinPos, lpMaxPos);
*lpMinPos = mysi->nMin;
@@ -395,10 +395,10 @@ int WINAPI CoolSB_SetScrollInfo (HWND hwnd, int fnBar, LPSCROLLINFO lpsi, BOOL f SCROLLBAR *sbar;
BOOL fRecalcFrame = FALSE;
- if(!lpsi)
+ if (!lpsi)
return FALSE;
- if(!(mysi = GetScrollInfoFromHwnd(hwnd, fnBar)))
+ if (!(mysi = GetScrollInfoFromHwnd(hwnd, fnBar)))
return SetScrollInfo(hwnd, fnBar, lpsi, fRedraw);
//if(CoolSB_IsThumbTracking(hwnd))
@@ -426,9 +426,9 @@ int WINAPI CoolSB_SetScrollInfo (HWND hwnd, int fnBar, LPSCROLLINFO lpsi, BOOL f sbar = GetScrollBarFromHwnd(hwnd, fnBar);
- if((lpsi->fMask & SIF_DISABLENOSCROLL) || (sbar->fScrollFlags & CSBS_THUMBALWAYS))
+ if ((lpsi->fMask & SIF_DISABLENOSCROLL) || (sbar->fScrollFlags & CSBS_THUMBALWAYS))
{
- if(!sbar->fScrollVisible)
+ if (!sbar->fScrollVisible)
{
CoolSB_ShowScrollBar(hwnd, fnBar, TRUE);
fRecalcFrame = TRUE;
@@ -436,7 +436,7 @@ int WINAPI CoolSB_SetScrollInfo (HWND hwnd, int fnBar, LPSCROLLINFO lpsi, BOOL f }
else
{
- if( mysi->nPage > (UINT)mysi->nMax
+ if ( mysi->nPage > (UINT)mysi->nMax
|| mysi->nPage == (UINT)mysi->nMax && mysi->nMax == 0
|| mysi->nMax <= mysi->nMin)
{
@@ -448,7 +448,7 @@ int WINAPI CoolSB_SetScrollInfo (HWND hwnd, int fnBar, LPSCROLLINFO lpsi, BOOL f }
else
{
- if(!sbar->fScrollVisible)
+ if (!sbar->fScrollVisible)
{
CoolSB_ShowScrollBar(hwnd, fnBar, TRUE);
fRecalcFrame = TRUE;
@@ -470,7 +470,7 @@ int WINAPI CoolSB_SetScrollPos(HWND hwnd, int nBar, int nPos, BOOL fRedraw) SCROLLINFO *mysi;
int oldpos;
- if(!(mysi = GetScrollInfoFromHwnd(hwnd, nBar)))
+ if (!(mysi = GetScrollInfoFromHwnd(hwnd, nBar)))
{
return SetScrollPos(hwnd, nBar, nPos, fRedraw);
}
@@ -494,7 +494,7 @@ int WINAPI CoolSB_SetScrollRange (HWND hwnd, int nBar, int nMinPos, int nMaxPos, {
SCROLLINFO *mysi;
- if(!(mysi = GetScrollInfoFromHwnd(hwnd, nBar)))
+ if (!(mysi = GetScrollInfoFromHwnd(hwnd, nBar)))
return SetScrollRange(hwnd, nBar, nMinPos, nMaxPos, fRedraw);
if(CoolSB_IsThumbTracking(hwnd))
@@ -520,10 +520,10 @@ BOOL WINAPI CoolSB_ShowScrollBar (HWND hwnd, int wBar, BOOL fShow) BOOL bFailed = FALSE;
DWORD dwStyle = GetWindowLong(hwnd, GWL_STYLE);
- if(!CoolSB_IsCoolScrollEnabled(hwnd))
+ if (!CoolSB_IsCoolScrollEnabled(hwnd))
return ShowScrollBar(hwnd, wBar, fShow);
- if((wBar == SB_HORZ || wBar == SB_BOTH) &&
+ if ((wBar == SB_HORZ || wBar == SB_BOTH) &&
(sbar = GetScrollBarFromHwnd(hwnd, SB_HORZ)))
{
sbar->fScrollFlags = sbar->fScrollFlags & ~CSBS_VISIBLE;
@@ -534,7 +534,7 @@ BOOL WINAPI CoolSB_ShowScrollBar (HWND hwnd, int wBar, BOOL fShow) else SetWindowLong(hwnd, GWL_STYLE, dwStyle & ~WS_HSCROLL);
}
- if((wBar == SB_VERT || wBar == SB_BOTH) &&
+ if ((wBar == SB_VERT || wBar == SB_BOTH) &&
(sbar = GetScrollBarFromHwnd(hwnd, SB_VERT)))
{
sbar->fScrollFlags = sbar->fScrollFlags & ~CSBS_VISIBLE;
@@ -572,7 +572,7 @@ HRESULT WINAPI UninitializeCoolSB(HWND hwnd) {
int i = 0;
SCROLLWND *sw = GetScrollWndFromHwnd(hwnd);
- if(!sw) return E_FAIL;
+ if (!sw) return E_FAIL;
//restore the window procedure with the original one
SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)sw->oldproc);
@@ -610,9 +610,9 @@ BOOL WINAPI CoolSB_InsertButton(HWND hwnd, int wSBflags, UINT nPos, SCROLLBUT *p SCROLLBUT *sbut;
UINT i;
- if(!psb) return FALSE;
+ if (!psb) return FALSE;
- if(!(sbar = GetScrollBarFromHwnd(hwnd, wSBflags)))
+ if (!(sbar = GetScrollBarFromHwnd(hwnd, wSBflags)))
return FALSE;
//check that we havn't reached the maximum allowed buttons yet
@@ -625,7 +625,7 @@ BOOL WINAPI CoolSB_InsertButton(HWND hwnd, int wSBflags, UINT nPos, SCROLLBUT *p sbut = &sbar->sbButtons[sbar->nButtons];
}
//otherwise, need to make room
- else if((int)nPos < 0 || (int)nPos > (UINT)sbar->nButtons)
+ else if ((int)nPos < 0 || (int)nPos > (UINT)sbar->nButtons)
{
return FALSE;
}
@@ -688,7 +688,7 @@ BOOL WINAPI CoolSB_InsertButton(HWND hwnd, int wSBflags, UINT nPos, SCROLLBUT *p We don't use the callback function anymore. The uButType
member must now specify SBBT_OWNERDRAW, and a WM_NOTIFY will
be sent when a button must be drawn
- if((psb->fMask & SBBF_OWNERDRAW) && ((psb->uButType & SBBT_MASK) == SBBT_OWNERDRAW))
+ if ((psb->fMask & SBBF_OWNERDRAW) && ((psb->uButType & SBBT_MASK) == SBBT_OWNERDRAW))
pDrawProc = psb->pDrawProc;
else
pDrawProc = 0;*/
@@ -698,7 +698,7 @@ BOOL WINAPI CoolSB_InsertButton(HWND hwnd, int wSBflags, UINT nPos, SCROLLBUT *p //MAKE SURE that any resizable buttons are only to the left / above
//a scrollbar. We don't support resize operations to the right of a scrollbar
- if((sbut->uButType & SBBM_RESIZABLE) && sbut->uPlacement == SBBP_RIGHT)
+ if ((sbut->uButType & SBBM_RESIZABLE) && sbut->uPlacement == SBBP_RIGHT)
sbut->uButType &= ~SBBM_RESIZABLE;
if(psb->fMask & SBBF_BUTMINMAX)
@@ -739,10 +739,10 @@ BOOL WINAPI CoolSB_ModifyButton (HWND hwnd, int wSBflags, UINT uItem, BOOL fByCm SCROLLBAR *sbar;
SCROLLBUT *sbut;
- if(!psb) return FALSE;
+ if (!psb) return FALSE;
//find if this window is CoolScroll enabled
- if(!(sbar = GetScrollBarFromHwnd(hwnd, wSBflags)))
+ if (!(sbar = GetScrollBarFromHwnd(hwnd, wSBflags)))
return FALSE;
//find the button to modify, depending on if we
@@ -750,7 +750,7 @@ BOOL WINAPI CoolSB_ModifyButton (HWND hwnd, int wSBflags, UINT uItem, BOOL fByCm if(fByCmd == FALSE)
{
//button from position
- if((int)uItem < 0 || (int)uItem >= (UINT)sbar->nButtons)
+ if ((int)uItem < 0 || (int)uItem >= (UINT)sbar->nButtons)
return FALSE;
else
sbut = &sbar->sbButtons[uItem];
@@ -758,7 +758,7 @@ BOOL WINAPI CoolSB_ModifyButton (HWND hwnd, int wSBflags, UINT uItem, BOOL fByCm else if(fByCmd == TRUE)
{
//button from command identifier
- if(!(sbut = GetButtonFromId(sbar, uItem)))
+ if (!(sbut = GetButtonFromId(sbar, uItem)))
return FALSE;
}
@@ -786,7 +786,7 @@ BOOL WINAPI CoolSB_RemoveButton(HWND hwnd, int wSBflags, UINT uItem, BOOL fByCmd SCROLLBAR *sbar;
//find if this window is CoolScroll enabled
- if(!(sbar = GetScrollBarFromHwnd(hwnd, wSBflags)))
+ if (!(sbar = GetScrollBarFromHwnd(hwnd, wSBflags)))
return FALSE;
//find the button to modify, depending on if we
@@ -833,10 +833,10 @@ BOOL WINAPI CoolSB_GetButton(HWND hwnd, int wSBflags, UINT uItem, BOOL fByCmd, S SCROLLBAR *sbar;
SCROLLBUT *sbut;
- if(!psb) return FALSE;
+ if (!psb) return FALSE;
//find if this window is CoolScroll enabled
- if(!(sbar = GetScrollBarFromHwnd(hwnd, wSBflags)))
+ if (!(sbar = GetScrollBarFromHwnd(hwnd, wSBflags)))
return FALSE;
//find the button to modify, depending on if we
@@ -844,7 +844,7 @@ BOOL WINAPI CoolSB_GetButton(HWND hwnd, int wSBflags, UINT uItem, BOOL fByCmd, S if(fByCmd == FALSE)
{
//button from position
- if((int)uItem < 0 || (int)uItem >= (UINT)sbar->nButtons)
+ if ((int)uItem < 0 || (int)uItem >= (UINT)sbar->nButtons)
return FALSE;
else
sbut = &sbar->sbButtons[uItem];
@@ -852,7 +852,7 @@ BOOL WINAPI CoolSB_GetButton(HWND hwnd, int wSBflags, UINT uItem, BOOL fByCmd, S else if(fByCmd == TRUE)
{
//button from command identifier
- if(!(sbut = GetButtonFromId(sbar, uItem)))
+ if (!(sbut = GetButtonFromId(sbar, uItem)))
return FALSE;
}
@@ -887,17 +887,17 @@ BOOL WINAPI CoolSB_SetSize (HWND hwnd, int wBar, int nLength, int nWidth) if(nLength > 256 || nWidth > 256)
return FALSE;
- if(!GetScrollWndFromHwnd(hwnd))
+ if (!GetScrollWndFromHwnd(hwnd))
return FALSE;
- if((wBar == SB_HORZ || wBar == SB_BOTH) &&
+ if ((wBar == SB_HORZ || wBar == SB_BOTH) &&
(sbar = GetScrollBarFromHwnd(hwnd, SB_HORZ)))
{
sbar->nArrowLength = nLength;
sbar->nArrowWidth = nWidth;
}
- if((wBar == SB_VERT || wBar == SB_BOTH) &&
+ if ((wBar == SB_VERT || wBar == SB_BOTH) &&
(sbar = GetScrollBarFromHwnd(hwnd, SB_VERT)))
{
sbar->nArrowLength = nLength;
@@ -919,16 +919,16 @@ BOOL WINAPI CoolSB_SetStyle(HWND hwnd, int wBar, UINT nStyle) {
SCROLLBAR *sbar;
- if(!GetScrollWndFromHwnd(hwnd))
+ if (!GetScrollWndFromHwnd(hwnd))
return FALSE;
- if((wBar == SB_HORZ || wBar == SB_BOTH) &&
+ if ((wBar == SB_HORZ || wBar == SB_BOTH) &&
(sbar = GetScrollBarFromHwnd(hwnd, SB_HORZ)))
{
sbar->fFlatScrollbar = nStyle;
}
- if((wBar == SB_VERT || wBar == SB_BOTH) &&
+ if ((wBar == SB_VERT || wBar == SB_BOTH) &&
(sbar = GetScrollBarFromHwnd(hwnd, SB_VERT)))
{
sbar->fFlatScrollbar = nStyle;
@@ -948,10 +948,10 @@ BOOL WINAPI CoolSB_SetThumbAlways(HWND hwnd, int wBar, BOOL fThumbAlways) {
SCROLLBAR *sbar;
- if(!GetScrollWndFromHwnd(hwnd))
+ if (!GetScrollWndFromHwnd(hwnd))
return FALSE;
- if((wBar == SB_HORZ || wBar == SB_BOTH) &&
+ if ((wBar == SB_HORZ || wBar == SB_BOTH) &&
(sbar = GetScrollBarFromHwnd(hwnd, SB_HORZ)))
{
if(fThumbAlways)
@@ -960,7 +960,7 @@ BOOL WINAPI CoolSB_SetThumbAlways(HWND hwnd, int wBar, BOOL fThumbAlways) sbar->fScrollFlags &= ~CSBS_THUMBALWAYS;
}
- if((wBar == SB_VERT || wBar == SB_BOTH) &&
+ if ((wBar == SB_VERT || wBar == SB_BOTH) &&
(sbar = GetScrollBarFromHwnd(hwnd, SB_VERT)))
{
if(fThumbAlways)
@@ -981,19 +981,19 @@ BOOL WINAPI CoolSB_SetMinThumbSize(HWND hwnd, UINT wBar, UINT size) {
SCROLLBAR *sbar;
- if(!GetScrollWndFromHwnd(hwnd))
+ if (!GetScrollWndFromHwnd(hwnd))
return FALSE;
if(size == -1)
size = CoolSB_GetDefaultMinThumbSize();
- if((wBar == SB_HORZ || wBar == SB_BOTH) &&
+ if ((wBar == SB_HORZ || wBar == SB_BOTH) &&
(sbar = GetScrollBarFromHwnd(hwnd, SB_HORZ)))
{
sbar->nMinThumbSize = size;
}
- if((wBar == SB_VERT || wBar == SB_BOTH) &&
+ if ((wBar == SB_VERT || wBar == SB_BOTH) &&
(sbar = GetScrollBarFromHwnd(hwnd, SB_VERT)))
{
sbar->nMinThumbSize = size;
diff --git a/plugins/Clist_nicer/coolsb/coolscroll.cpp b/plugins/Clist_nicer/coolsb/coolscroll.cpp index 68fd144edb..ae31ec3e47 100644 --- a/plugins/Clist_nicer/coolsb/coolscroll.cpp +++ b/plugins/Clist_nicer/coolsb/coolscroll.cpp @@ -106,7 +106,7 @@ BOOL WINAPI CoolSB_IsThumbTracking(HWND hwnd) {
SCROLLWND *sw;
- if((sw = GetScrollWndFromHwnd(hwnd)) == NULL)
+ if ((sw = GetScrollWndFromHwnd(hwnd)) == NULL)
return FALSE;
else
return sw->fThumbTracking;
@@ -142,7 +142,7 @@ static void __stdcall RotateRect0(SCROLLBAR *sb, RECT *rect) //
static BOOL IsScrollInfoActive(SCROLLINFO *si)
{
- if((si->nPage > (UINT)si->nMax
+ if ((si->nPage > (UINT)si->nMax
|| si->nMax <= si->nMin || si->nMax == 0))
return FALSE;
else
@@ -155,7 +155,7 @@ static BOOL IsScrollInfoActive(SCROLLINFO *si) static BOOL IsScrollbarActive(SCROLLBAR *sb)
{
SCROLLINFO *si = &sb->scrollInfo;
- if(((sb->fScrollFlags & ESB_DISABLE_BOTH) == ESB_DISABLE_BOTH) ||
+ if (((sb->fScrollFlags & ESB_DISABLE_BOTH) == ESB_DISABLE_BOTH) ||
!(sb->fScrollFlags & CSBS_THUMBALWAYS) && !IsScrollInfoActive(si))
return FALSE;
else
@@ -832,7 +832,7 @@ static LRESULT NCDrawHScrollbar(SCROLLBAR *sb, HWND hwnd, HDC hdc, const RECT *r if(sb->fScrollFlags & ESB_DISABLE_RIGHT) uRightButFlags |= DFCS_INACTIVE;
//if we need to grey the arrows because there is no data to scroll
- if(!IsScrollInfoActive(si) && !(sb->fScrollFlags & CSBS_THUMBALWAYS))
+ if (!IsScrollInfoActive(si) && !(sb->fScrollFlags & CSBS_THUMBALWAYS))
{
uLeftButFlags |= DFCS_INACTIVE;
uRightButFlags |= DFCS_INACTIVE;
@@ -954,7 +954,7 @@ static LRESULT NCDrawHScrollbar(SCROLLBAR *sb, HWND hwnd, HDC hdc, const RECT *r //if we always show the thumb covering the whole scrollbar,
//then draw it that way
- if(!IsScrollInfoActive(si) && (sb->fScrollFlags & CSBS_THUMBALWAYS)
+ if (!IsScrollInfoActive(si) && (sb->fScrollFlags & CSBS_THUMBALWAYS)
&& ctrl.right - ctrl.left > sb->nMinThumbSize)
{
//leave a 1-pixel gap between the thumb + right button
@@ -1342,7 +1342,7 @@ static LRESULT DrawHorzButtons(SCROLLBAR *sbar, HDC hdc, const RECT *rect, int l for(i = 0; i < sbar->nButtons; i++)
{
- if((leftright & SBBP_LEFT) && sbut[i].uPlacement == SBBP_LEFT)
+ if ((leftright & SBBP_LEFT) && sbut[i].uPlacement == SBBP_LEFT)
{
int butwidth = GetSingleButSize(sbar, &sbut[i]);
SetRect(&ctrl, xposl, rect->top, xposl + butwidth, rect->bottom);
@@ -1352,7 +1352,7 @@ static LRESULT DrawHorzButtons(SCROLLBAR *sbar, HDC hdc, const RECT *rect, int l xposl += butwidth;
}
- if((leftright & SBBP_RIGHT) && sbut[i].uPlacement == SBBP_RIGHT)
+ if ((leftright & SBBP_RIGHT) && sbut[i].uPlacement == SBBP_RIGHT)
{
int butwidth = GetSingleButSize(sbar, &sbut[i]);
SetRect(&ctrl, xposr, rect->top, xposr + butwidth, rect->bottom);
@@ -1603,7 +1603,7 @@ static LRESULT NCPaint(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lParam) CopyRect(&rect2, &rect);
OffsetRect(&rect2, winrect.left, winrect.top);
- if(!sw->fLeftScrollbar && parent.right == rect2.right+sw->cxRightEdge && parent.bottom == rect2.bottom+sw->cyBottomEdge
+ if (!sw->fLeftScrollbar && parent.right == rect2.right+sw->cxRightEdge && parent.bottom == rect2.bottom+sw->cyBottomEdge
|| sw->fLeftScrollbar && parent.left == rect2.left -sw->cxLeftEdge && parent.bottom == rect2.bottom+sw->cyBottomEdge)
DrawFrameControl(hdc, &rect, DFC_SCROLL, sw->fLeftScrollbar ? DFCS_SCROLLSIZEGRIPRIGHT : DFCS_SCROLLSIZEGRIP );
else
@@ -1770,7 +1770,7 @@ static UINT GetHorzButtonFromPt(SCROLLBAR *sb, RECT *rect, POINT pt, BOOL fRetur int butwidth;
SCROLLBUT *sbut = sb->sbButtons;
- if(!PtInRect(rect, pt))
+ if (!PtInRect(rect, pt))
return -1;
if(sb->fButVisibleAfter)
@@ -2007,7 +2007,7 @@ static LRESULT NCLButtonDown(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lPa case HTSCROLL_THUMB:
//if the scrollbar is disabled, then do no further processing
- if(!IsScrollbarActive(sb))
+ if (!IsScrollbarActive(sb))
return 0;
GetRealScrollRect(sb, &rect);
@@ -2056,7 +2056,7 @@ static LRESULT NCLButtonDown(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lPa target1:
//if the scrollbar is disabled, then do no further processing
- if(!IsScrollbarActive(sb))
+ if (!IsScrollbarActive(sb))
break;
//ajust the horizontal rectangle to NOT include
@@ -2162,7 +2162,7 @@ static LRESULT LButtonUp(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lParam) SCROLLBUT *sbut = &sb->sbButtons[buttonIdx];
UINT cmdid = sbut->uCmdId;
- if((sbut->uButType & SBBT_MASK) == SBBT_TOGGLEBUTTON)
+ if ((sbut->uButType & SBBT_MASK) == SBBT_TOGGLEBUTTON)
sbut->uState ^= 1;
//send a notify??
@@ -2274,7 +2274,7 @@ static LRESULT ThumbTrackHorz(SCROLLBAR *sbar, HWND hwnd, int x, int y) //if the mouse is not in a suitable distance of the scrollbar,
//then "snap" the thumb back to its initial position
#ifdef SNAP_THUMB_BACK
- if(!PtInRect(&rc2, pt))
+ if (!PtInRect(&rc2, pt))
{
thumbpos = nThumbPos0;
}
@@ -2494,7 +2494,7 @@ static LRESULT MouseMove(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lParam) if(sbut->nSize < (int)sbut->nMinSize)
sbut->nSize = sbut->nMinSize;
- if((UINT)sbut->nSize > (UINT)sbut->nMaxSize)
+ if ((UINT)sbut->nSize > (UINT)sbut->nMaxSize)
sbut->nSize = sbut->nMaxSize;
GetScrollRect(sw, uCurrentScrollbar, hwnd, &rect2);
@@ -2645,7 +2645,7 @@ static void ResizeButtonsToFit(SCROLLWND *sw, SCROLLBAR *sbar, HWND hwnd) if(sbut->nSize < (int)sbut->nMinSize)
sbut->nSize = sbut->nMinSize;
- if((UINT)sbut->nSize > (UINT)sbut->nMaxSize)
+ if ((UINT)sbut->nSize > (UINT)sbut->nMaxSize)
sbut->nSize = sbut->nMaxSize;
@@ -2713,7 +2713,7 @@ static LRESULT NCCalcSize(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lParam //if there is room, allocate some space for the horizontal scrollbar
//NOTE: Change the ">" to a ">=" to make the horz bar totally fill the
//window before disappearing
- if((sb->fScrollFlags & CSBS_VISIBLE) &&
+ if ((sb->fScrollFlags & CSBS_VISIBLE) &&
#ifdef COOLSB_FILLWINDOW
rect->bottom - rect->top >= GetScrollMetric(sb, SM_CYHORZSB))
#else
@@ -2729,7 +2729,7 @@ static LRESULT NCCalcSize(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lParam sb = &sw->sbarVert;
//if there is room, allocate some space for the vertical scrollbar
- if((sb->fScrollFlags & CSBS_VISIBLE) &&
+ if ((sb->fScrollFlags & CSBS_VISIBLE) &&
rect->right - rect->left >= GetScrollMetric(sb, SM_CXVERTSB))
{
if(sw->fLeftScrollbar)
@@ -2822,7 +2822,7 @@ static LRESULT CoolSB_Timer(SCROLLWND *swnd, HWND hwnd, WPARAM wTimerId, LPARAM //then kill the timer..
GetCursorPos(&pt);
- if(!PtInRect(&MouseOverRect, pt))
+ if (!PtInRect(&MouseOverRect, pt))
{
KillTimer(hwnd, uMouseOverId);
uMouseOverId = 0;
@@ -3020,7 +3020,7 @@ static LRESULT CoolSB_SetCursor(SCROLLWND *swnd, HWND hwnd, WPARAM wParam, LPARA }
//set the cursor if one has been specified
- if((id = GetButtonFromPt(sbar, &rect, pt, TRUE)) != -1)
+ if ((id = GetButtonFromPt(sbar, &rect, pt, TRUE)) != -1)
{
sbut = &sbar->sbButtons[id];
curTool = sbut->uCmdId;
|