ReactOS  0.4.13-dev-563-g0561610
rebar.c File Reference
#include <assert.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "wine/unicode.h"
#include "winuser.h"
#include "winnls.h"
#include "commctrl.h"
#include "comctl32.h"
#include "uxtheme.h"
#include "vssym32.h"
#include "wine/debug.h"
Include dependency graph for rebar.c:

Go to the source code of this file.

Classes

struct  REBAR_BAND
 
struct  REBAR_INFO
 

Macros

#define GLATESTING   0
 
#define CCS_LAYOUT_MASK   0x3
 
#define HAS_GRIPPER   0x00000001
 
#define HAS_IMAGE   0x00000002
 
#define HAS_TEXT   0x00000004
 
#define DRAW_GRIPPER   0x00000001
 
#define DRAW_IMAGE   0x00000002
 
#define DRAW_TEXT   0x00000004
 
#define DRAW_CHEVRONHOT   0x00000040
 
#define DRAW_CHEVRONPUSHED   0x00000080
 
#define NTF_INVALIDATE   0x01000000
 
#define BEGIN_DRAG_ISSUED   0x00000001
 
#define SELF_RESIZE   0x00000002
 
#define BAND_NEEDS_REDRAW   0x00000020
 
#define RBBS_UNDOC_FIXEDHEADER   0x40000000
 
#define SEP_WIDTH_SIZE   2
 
#define SEP_WIDTH   ((infoPtr->dwStyle & RBS_BANDBORDERS) ? SEP_WIDTH_SIZE : 0)
 
#define REBAR_ALWAYS_SPACE   4
 
#define REBAR_POST_IMAGE   2
 
#define REBAR_POST_TEXT   4
 
#define GRIPPER_HEIGHT   16
 
#define REBAR_PRE_GRIPPER   2
 
#define GRIPPER_WIDTH   3
 
#define CHEVRON_WIDTH   10
 
#define REBAR_POST_CHILD   4
 
#define REBAR_DIVIDER   2
 
#define REBAR_NO_CHILD_HEIGHT   4
 
#define REBAR_MINSIZE   23
 
#define REBARSPACE(a)   ((a->fStyle & RBBS_CHILDEDGE) ? 2*REBAR_DIVIDER : 0)
 
#define RB_GETBANDINFO_OLD   (WM_USER+5) /* obsoleted after IE3, but we have to support it anyway */
 
#define HIDDENBAND(a)
 
#define REBAR_GetInfoPtr(wndPtr)   ((REBAR_INFO *)GetWindowLongPtrW (hwnd, 0))
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (rebar)
 
static LRESULT REBAR_NotifyFormat (REBAR_INFO *infoPtr, LPARAM lParam)
 
static void REBAR_AutoSize (REBAR_INFO *infoPtr, BOOL needsLayout)
 
static REBAR_BANDREBAR_GetBand (const REBAR_INFO *infoPtr, INT i)
 
static CHARREBAR_FmtStyle (UINT style)
 
static CHARREBAR_FmtMask (UINT mask)
 
static VOID REBAR_DumpBandInfo (const REBARBANDINFOW *pB)
 
static VOID REBAR_DumpBand (const REBAR_INFO *iP)
 
static void translate_rect (const REBAR_INFO *infoPtr, RECT *dest, const RECT *src)
 
static int get_rect_cx (const REBAR_INFO *infoPtr, const RECT *lpRect)
 
static int get_rect_cy (const REBAR_INFO *infoPtr, const RECT *lpRect)
 
static int round_child_height (const REBAR_BAND *lpBand, int cyHeight)
 
static void update_min_band_height (const REBAR_INFO *infoPtr, REBAR_BAND *lpBand)
 
static void REBAR_DrawChevron (HDC hdc, INT left, INT top, INT colorRef)
 
static HWND REBAR_GetNotifyParent (const REBAR_INFO *infoPtr)
 
static INT REBAR_Notify (NMHDR *nmhdr, const REBAR_INFO *infoPtr, UINT code)
 
static INT REBAR_Notify_NMREBAR (const REBAR_INFO *infoPtr, UINT uBand, UINT code)
 
static VOID REBAR_DrawBand (HDC hdc, const REBAR_INFO *infoPtr, REBAR_BAND *lpBand)
 
static VOID REBAR_Refresh (const REBAR_INFO *infoPtr, HDC hdc)
 
static void REBAR_CalcHorzBand (const REBAR_INFO *infoPtr, UINT rstart, UINT rend)
 
static VOID REBAR_CalcVertBand (const REBAR_INFO *infoPtr, UINT rstart, UINT rend)
 
static VOID REBAR_ForceResize (REBAR_INFO *infoPtr)
 
static VOID REBAR_MoveChildWindows (const REBAR_INFO *infoPtr, UINT start, UINT endplus)
 
static int next_visible (const REBAR_INFO *infoPtr, int i)
 
static int prev_visible (const REBAR_INFO *infoPtr, int i)
 
static int first_visible (const REBAR_INFO *infoPtr)
 
static int get_row_begin_for_band (const REBAR_INFO *infoPtr, INT iBand)
 
static int get_row_end_for_band (const REBAR_INFO *infoPtr, INT iBand)
 
static void REBAR_SetRowRectsX (const REBAR_INFO *infoPtr, INT iBeginBand, INT iEndBand)
 
static REBAR_BANDREBAR_FindBandToGrow (const REBAR_INFO *infoPtr, INT iBeginBand, INT iEndBand)
 
static int REBAR_ShrinkBandsRTL (const REBAR_INFO *infoPtr, INT iBeginBand, INT iEndBand, INT cxShrink, BOOL bEnforce)
 
static int REBAR_ShrinkBandsLTR (const REBAR_INFO *infoPtr, INT iBeginBand, INT iEndBand, INT cxShrink, BOOL bEnforce)
 
static int REBAR_MoveBandToRowOffset (REBAR_INFO *infoPtr, INT iBand, INT iFirstBand, INT iLastBand, INT xOff, BOOL reorder)
 
static int REBAR_SetBandsHeight (const REBAR_INFO *infoPtr, INT iBeginBand, INT iEndBand, INT yStart)
 
static void REBAR_LayoutRow (const REBAR_INFO *infoPtr, int iBeginBand, int iEndBand, int cx, int *piRow, int *pyPos)
 
static VOID REBAR_Layout (REBAR_INFO *infoPtr)
 
static int REBAR_SizeChildrenToHeight (const REBAR_INFO *infoPtr, int iBeginBand, int iEndBand, int extra, BOOL *fChanged)
 
static VOID REBAR_SizeToHeight (REBAR_INFO *infoPtr, int height)
 
static VOID REBAR_ValidateBand (const REBAR_INFO *infoPtr, REBAR_BAND *lpBand)
 
static UINT REBAR_CommonSetupBand (HWND hwnd, const REBARBANDINFOW *lprbbi, REBAR_BAND *lpBand)
 
static LRESULT REBAR_EraseBkGnd (const REBAR_INFO *infoPtr, HDC hdc)
 
static void REBAR_InternalHitTest (const REBAR_INFO *infoPtr, const POINT *lpPt, UINT *pFlags, INT *pBand)
 
static void REBAR_HandleLRDrag (REBAR_INFO *infoPtr, const POINT *ptsmove)
 
static void REBAR_HandleUDDrag (REBAR_INFO *infoPtr, const POINT *ptsmove)
 
static LRESULT REBAR_DeleteBand (REBAR_INFO *infoPtr, WPARAM wParam)
 
static LRESULT REBAR_GetBandBorders (const REBAR_INFO *infoPtr, UINT uBand, RECT *lpRect)
 
static LRESULT REBAR_GetBandCount (const REBAR_INFO *infoPtr)
 
static LRESULT REBAR_GetBandInfoT (const REBAR_INFO *infoPtr, UINT uIndex, LPREBARBANDINFOW lprbbi, BOOL bUnicode)
 
static LRESULT REBAR_GetBarHeight (const REBAR_INFO *infoPtr)
 
static LRESULT REBAR_GetBarInfo (const REBAR_INFO *infoPtr, LPREBARINFO lpInfo)
 
static LRESULT REBAR_GetBkColor (const REBAR_INFO *infoPtr)
 
static LRESULT REBAR_GetPalette (const REBAR_INFO *infoPtr)
 
static LRESULT REBAR_GetRect (const REBAR_INFO *infoPtr, INT iBand, RECT *lprc)
 
static LRESULT REBAR_GetRowCount (const REBAR_INFO *infoPtr)
 
static LRESULT REBAR_GetRowHeight (const REBAR_INFO *infoPtr, INT iRow)
 
static LRESULT REBAR_GetTextColor (const REBAR_INFO *infoPtr)
 
static LRESULT REBAR_GetToolTips (const REBAR_INFO *infoPtr)
 
static LRESULT REBAR_GetUnicodeFormat (const REBAR_INFO *infoPtr)
 
static LRESULT REBAR_GetVersion (const REBAR_INFO *infoPtr)
 
static LRESULT REBAR_HitTest (const REBAR_INFO *infoPtr, LPRBHITTESTINFO lprbht)
 
static LRESULT REBAR_IdToIndex (const REBAR_INFO *infoPtr, UINT uId)
 
static LRESULT REBAR_InsertBandT (REBAR_INFO *infoPtr, INT iIndex, const REBARBANDINFOW *lprbbi, BOOL bUnicode)
 
static LRESULT REBAR_MaximizeBand (const REBAR_INFO *infoPtr, INT iBand, LPARAM lParam)
 
static LRESULT REBAR_MinimizeBand (const REBAR_INFO *infoPtr, INT iBand)
 
static LRESULT REBAR_MoveBand (REBAR_INFO *infoPtr, INT iFrom, INT iTo)
 
static BOOL REBAR_strdifW (LPCWSTR a, LPCWSTR b)
 
static LRESULT REBAR_SetBandInfoT (REBAR_INFO *infoPtr, INT iBand, const REBARBANDINFOW *lprbbi, BOOL bUnicode)
 
static LRESULT REBAR_SetBarInfo (REBAR_INFO *infoPtr, const REBARINFO *lpInfo)
 
static LRESULT REBAR_SetBkColor (REBAR_INFO *infoPtr, COLORREF clr)
 
static LRESULT REBAR_SetParent (REBAR_INFO *infoPtr, HWND parent)
 
static LRESULT REBAR_SetTextColor (REBAR_INFO *infoPtr, COLORREF clr)
 
static LRESULT REBAR_SetUnicodeFormat (REBAR_INFO *infoPtr, BOOL unicode)
 
static LRESULT REBAR_SetVersion (REBAR_INFO *infoPtr, INT iVersion)
 
static LRESULT REBAR_ShowBand (REBAR_INFO *infoPtr, INT iBand, BOOL show)
 
static LRESULT REBAR_SizeToRect (REBAR_INFO *infoPtr, const RECT *lpRect)
 
static LRESULT REBAR_Create (REBAR_INFO *infoPtr, LPCREATESTRUCTW cs)
 
static LRESULT REBAR_Destroy (REBAR_INFO *infoPtr)
 
static LRESULT REBAR_GetFont (const REBAR_INFO *infoPtr)
 
static LRESULT REBAR_PushChevron (const REBAR_INFO *infoPtr, UINT uBand, LPARAM lParam)
 
static LRESULT REBAR_LButtonDown (REBAR_INFO *infoPtr, LPARAM lParam)
 
static LRESULT REBAR_LButtonUp (REBAR_INFO *infoPtr)
 
static LRESULT REBAR_MouseLeave (REBAR_INFO *infoPtr)
 
static LRESULT REBAR_MouseMove (REBAR_INFO *infoPtr, LPARAM lParam)
 
static LRESULT REBAR_NCCalcSize (const REBAR_INFO *infoPtr, RECT *rect)
 
static LRESULT REBAR_NCCreate (HWND hwnd, const CREATESTRUCTW *cs)
 
static LRESULT REBAR_NCHitTest (const REBAR_INFO *infoPtr, LPARAM lParam)
 
static LRESULT REBAR_NCPaint (const REBAR_INFO *infoPtr)
 
static LRESULT REBAR_Paint (const REBAR_INFO *infoPtr, HDC hdc)
 
static LRESULT REBAR_SetCursor (const REBAR_INFO *infoPtr, LPARAM lParam)
 
static LRESULT REBAR_SetFont (REBAR_INFO *infoPtr, HFONT font)
 
static LRESULT REBAR_SetRedraw (REBAR_INFO *infoPtr, BOOL redraw)
 
static LRESULT REBAR_Size (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
 
static LRESULT REBAR_StyleChanged (REBAR_INFO *infoPtr, INT nType, const STYLESTRUCT *lpStyle)
 
static LRESULT theme_changed (REBAR_INFO *infoPtr)
 
static LRESULT REBAR_WindowPosChanged (const REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
 
static LRESULT WINAPI REBAR_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
VOID REBAR_Register (void)
 
VOID REBAR_Unregister (void)
 

Variables

static UINT mindragx = 0
 
static UINT mindragy = 0
 
static const char *const band_stylename []
 
static const char *const band_maskname []
 
static CHAR line [200]
 
static const WCHAR themeClass [] = { 'R','e','b','a','r',0 }
 

Macro Definition Documentation

◆ BAND_NEEDS_REDRAW

#define BAND_NEEDS_REDRAW   0x00000020

Definition at line 194 of file rebar.c.

◆ BEGIN_DRAG_ISSUED

#define BEGIN_DRAG_ISSUED   0x00000001

Definition at line 192 of file rebar.c.

◆ CCS_LAYOUT_MASK

#define CCS_LAYOUT_MASK   0x3

Definition at line 140 of file rebar.c.

◆ CHEVRON_WIDTH

#define CHEVRON_WIDTH   10

Definition at line 228 of file rebar.c.

◆ DRAW_CHEVRONHOT

#define DRAW_CHEVRONHOT   0x00000040

Definition at line 151 of file rebar.c.

◆ DRAW_CHEVRONPUSHED

#define DRAW_CHEVRONPUSHED   0x00000080

Definition at line 152 of file rebar.c.

◆ DRAW_GRIPPER

#define DRAW_GRIPPER   0x00000001

Definition at line 148 of file rebar.c.

◆ DRAW_IMAGE

#define DRAW_IMAGE   0x00000002

Definition at line 149 of file rebar.c.

◆ DRAW_TEXT

#define DRAW_TEXT   0x00000004

Definition at line 150 of file rebar.c.

◆ GLATESTING

#define GLATESTING   0

Definition at line 71 of file rebar.c.

◆ GRIPPER_HEIGHT

#define GRIPPER_HEIGHT   16

Definition at line 218 of file rebar.c.

◆ GRIPPER_WIDTH

#define GRIPPER_WIDTH   3

Definition at line 225 of file rebar.c.

◆ HAS_GRIPPER

#define HAS_GRIPPER   0x00000001

Definition at line 143 of file rebar.c.

◆ HAS_IMAGE

#define HAS_IMAGE   0x00000002

Definition at line 144 of file rebar.c.

◆ HAS_TEXT

#define HAS_TEXT   0x00000004

Definition at line 145 of file rebar.c.

◆ HIDDENBAND

#define HIDDENBAND (   a)
Value:
(((a)->fStyle & RBBS_HIDDEN) || \
((infoPtr->dwStyle & CCS_VERT) && \
((a)->fStyle & RBBS_NOVERT)))
#define RBBS_NOVERT
Definition: commctrl.h:1465
#define CCS_VERT
Definition: commctrl.h:2221
#define a
Definition: ke_i.h:78
#define RBBS_HIDDEN
Definition: commctrl.h:1464
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

Definition at line 252 of file rebar.c.

◆ NTF_INVALIDATE

#define NTF_INVALIDATE   0x01000000

Definition at line 153 of file rebar.c.

◆ RB_GETBANDINFO_OLD

#define RB_GETBANDINFO_OLD   (WM_USER+5) /* obsoleted after IE3, but we have to support it anyway */

Definition at line 249 of file rebar.c.

◆ RBBS_UNDOC_FIXEDHEADER

#define RBBS_UNDOC_FIXEDHEADER   0x40000000

Definition at line 197 of file rebar.c.

◆ REBAR_ALWAYS_SPACE

#define REBAR_ALWAYS_SPACE   4

Definition at line 209 of file rebar.c.

◆ REBAR_DIVIDER

#define REBAR_DIVIDER   2

Definition at line 235 of file rebar.c.

◆ REBAR_GetInfoPtr

#define REBAR_GetInfoPtr (   wndPtr)    ((REBAR_INFO *)GetWindowLongPtrW (hwnd, 0))

Definition at line 256 of file rebar.c.

◆ REBAR_MINSIZE

#define REBAR_MINSIZE   23

Definition at line 242 of file rebar.c.

◆ REBAR_NO_CHILD_HEIGHT

#define REBAR_NO_CHILD_HEIGHT   4

Definition at line 238 of file rebar.c.

◆ REBAR_POST_CHILD

#define REBAR_POST_CHILD   4

Definition at line 231 of file rebar.c.

◆ REBAR_POST_IMAGE

#define REBAR_POST_IMAGE   2

Definition at line 212 of file rebar.c.

◆ REBAR_POST_TEXT

#define REBAR_POST_TEXT   4

Definition at line 215 of file rebar.c.

◆ REBAR_PRE_GRIPPER

#define REBAR_PRE_GRIPPER   2

Definition at line 221 of file rebar.c.

◆ REBARSPACE

#define REBARSPACE (   a)    ((a->fStyle & RBBS_CHILDEDGE) ? 2*REBAR_DIVIDER : 0)

Definition at line 245 of file rebar.c.

◆ SELF_RESIZE

#define SELF_RESIZE   0x00000002

Definition at line 193 of file rebar.c.

◆ SEP_WIDTH

#define SEP_WIDTH   ((infoPtr->dwStyle & RBS_BANDBORDERS) ? SEP_WIDTH_SIZE : 0)

Definition at line 205 of file rebar.c.

◆ SEP_WIDTH_SIZE

#define SEP_WIDTH_SIZE   2

Definition at line 204 of file rebar.c.

Function Documentation

◆ first_visible()

static int first_visible ( const REBAR_INFO infoPtr)
static

Definition at line 1133 of file rebar.c.

1134 {
1135  return next_visible(infoPtr, -1); /* this works*/
1136 }
static int next_visible(const REBAR_INFO *infoPtr, int i)
Definition: rebar.c:1112

Referenced by REBAR_HandleUDDrag(), REBAR_Layout(), and REBAR_SizeToHeight().

◆ get_rect_cx()

static int get_rect_cx ( const REBAR_INFO infoPtr,
const RECT lpRect 
)
static

Definition at line 450 of file rebar.c.

451 {
452  if (infoPtr->dwStyle & CCS_VERT)
453  return lpRect->bottom - lpRect->top;
454  return lpRect->right - lpRect->left;
455 }
DWORD dwStyle
Definition: rebar.c:170
LONG top
Definition: windef.h:292
LONG left
Definition: windef.h:291
LONG right
Definition: windef.h:293
#define CCS_VERT
Definition: commctrl.h:2221
LONG bottom
Definition: windef.h:294

Referenced by REBAR_Layout().

◆ get_rect_cy()

static int get_rect_cy ( const REBAR_INFO infoPtr,
const RECT lpRect 
)
static

Definition at line 457 of file rebar.c.

458 {
459  if (infoPtr->dwStyle & CCS_VERT)
460  return lpRect->right - lpRect->left;
461  return lpRect->bottom - lpRect->top;
462 }
DWORD dwStyle
Definition: rebar.c:170
LONG top
Definition: windef.h:292
LONG left
Definition: windef.h:291
LONG right
Definition: windef.h:293
#define CCS_VERT
Definition: commctrl.h:2221
LONG bottom
Definition: windef.h:294

Referenced by REBAR_AutoSize(), and REBAR_SizeToRect().

◆ get_row_begin_for_band()

static int get_row_begin_for_band ( const REBAR_INFO infoPtr,
INT  iBand 
)
static

Definition at line 1139 of file rebar.c.

1140 {
1141  int iLastBand = iBand;
1142  int iRow = REBAR_GetBand(infoPtr, iBand)->iRow;
1143  while ((iBand = prev_visible(infoPtr, iBand)) >= 0) {
1144  if (REBAR_GetBand(infoPtr, iBand)->iRow != iRow)
1145  break;
1146  else
1147  iLastBand = iBand;
1148  }
1149  return iLastBand;
1150 }
INT iRow
Definition: rebar.c:124
static int prev_visible(const REBAR_INFO *infoPtr, int i)
Definition: rebar.c:1123
static REBAR_BAND * REBAR_GetBand(const REBAR_INFO *infoPtr, INT i)
Definition: rebar.c:262

Referenced by REBAR_HandleLRDrag(), REBAR_MaximizeBand(), and REBAR_MinimizeBand().

◆ get_row_end_for_band()

static int get_row_end_for_band ( const REBAR_INFO infoPtr,
INT  iBand 
)
static

Definition at line 1153 of file rebar.c.

1154 {
1155  int iRow = REBAR_GetBand(infoPtr, iBand)->iRow;
1156  while ((iBand = next_visible(infoPtr, iBand)) < infoPtr->uNumBands)
1157  if (REBAR_GetBand(infoPtr, iBand)->iRow != iRow)
1158  break;
1159  return iBand;
1160 }
UINT uNumBands
Definition: rebar.c:162
INT iRow
Definition: rebar.c:124
static int next_visible(const REBAR_INFO *infoPtr, int i)
Definition: rebar.c:1112
static REBAR_BAND * REBAR_GetBand(const REBAR_INFO *infoPtr, INT i)
Definition: rebar.c:262

Referenced by REBAR_HandleLRDrag(), REBAR_HandleUDDrag(), REBAR_MaximizeBand(), and REBAR_MinimizeBand().

◆ next_visible()

static int next_visible ( const REBAR_INFO infoPtr,
int  i 
)
static

Definition at line 1112 of file rebar.c.

1113 {
1114  unsigned int n;
1115  for (n = i + 1; n < infoPtr->uNumBands; n++)
1116  if (!HIDDENBAND(REBAR_GetBand(infoPtr, n)))
1117  break;
1118  return n;
1119 }
UINT uNumBands
Definition: rebar.c:162
GLdouble n
Definition: glext.h:7729
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static REBAR_BAND * REBAR_GetBand(const REBAR_INFO *infoPtr, INT i)
Definition: rebar.c:262
#define HIDDENBAND(a)
Definition: rebar.c:252

Referenced by first_visible(), get_row_end_for_band(), REBAR_Layout(), REBAR_LayoutRow(), REBAR_MaximizeBand(), REBAR_MinimizeBand(), REBAR_MoveBandToRowOffset(), REBAR_SetBandsHeight(), REBAR_SetRowRectsX(), REBAR_ShrinkBandsLTR(), REBAR_SizeChildrenToHeight(), and REBAR_SizeToHeight().

◆ prev_visible()

static int prev_visible ( const REBAR_INFO infoPtr,
int  i 
)
static

Definition at line 1123 of file rebar.c.

1124 {
1125  int n;
1126  for (n = i - 1; n >= 0; n--)
1127  if (!HIDDENBAND(REBAR_GetBand(infoPtr, n)))
1128  break;
1129  return n;
1130 }
GLdouble n
Definition: glext.h:7729
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static REBAR_BAND * REBAR_GetBand(const REBAR_INFO *infoPtr, INT i)
Definition: rebar.c:262
#define HIDDENBAND(a)
Definition: rebar.c:252

Referenced by get_row_begin_for_band(), REBAR_FindBandToGrow(), REBAR_HandleLRDrag(), REBAR_MinimizeBand(), REBAR_ShrinkBandsRTL(), and REBAR_SizeToHeight().

◆ REBAR_AutoSize()

static VOID REBAR_AutoSize ( REBAR_INFO infoPtr,
BOOL  needsLayout 
)
static

Definition at line 1574 of file rebar.c.

1575 {
1576  RECT rc, rcNew;
1577  NMRBAUTOSIZE autosize;
1578 
1579  if (needsLayout)
1580  REBAR_Layout(infoPtr);
1581  GetClientRect(infoPtr->hwndSelf, &rc);
1582  REBAR_SizeToHeight(infoPtr, get_rect_cy(infoPtr, &rc));
1583  GetClientRect(infoPtr->hwndSelf, &rcNew);
1584 
1585  GetClientRect(infoPtr->hwndSelf, &autosize.rcTarget);
1586  autosize.fChanged = EqualRect(&rc, &rcNew);
1587  autosize.rcTarget = rc;
1588  autosize.rcActual = rcNew;
1589  REBAR_Notify((NMHDR *)&autosize, infoPtr, RBN_AUTOSIZE);
1590 }
#define RBN_AUTOSIZE
Definition: commctrl.h:1603
static VOID REBAR_SizeToHeight(REBAR_INFO *infoPtr, int height)
Definition: rebar.c:1496
HWND hwndSelf
Definition: rebar.c:164
static INT REBAR_Notify(NMHDR *nmhdr, const REBAR_INFO *infoPtr, UINT code)
Definition: rebar.c:517
static VOID REBAR_Layout(REBAR_INFO *infoPtr)
Definition: rebar.c:1382
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)
static int get_rect_cy(const REBAR_INFO *infoPtr, const RECT *lpRect)
Definition: rebar.c:457

Referenced by REBAR_Layout(), and REBAR_Size().

◆ REBAR_CalcHorzBand()

static void REBAR_CalcHorzBand ( const REBAR_INFO infoPtr,
UINT  rstart,
UINT  rend 
)
static

Definition at line 718 of file rebar.c.

722 {
723  REBAR_BAND *lpBand;
724  UINT i, xoff;
725  RECT work;
726 
727  for(i=rstart; i<rend; i++){
728  lpBand = REBAR_GetBand(infoPtr, i);
729  if (HIDDENBAND(lpBand)) {
730  SetRect (&lpBand->rcChild,
731  lpBand->rcBand.right, lpBand->rcBand.top,
732  lpBand->rcBand.right, lpBand->rcBand.bottom);
733  continue;
734  }
735 
736  /* set initial gripper rectangle */
737  SetRect (&lpBand->rcGripper, lpBand->rcBand.left, lpBand->rcBand.top,
738  lpBand->rcBand.left, lpBand->rcBand.bottom);
739 
740  /* calculate gripper rectangle */
741  if ( lpBand->fStatus & HAS_GRIPPER) {
742  lpBand->fDraw |= DRAW_GRIPPER;
743  lpBand->rcGripper.left += REBAR_PRE_GRIPPER;
744  lpBand->rcGripper.right = lpBand->rcGripper.left + GRIPPER_WIDTH;
745  InflateRect(&lpBand->rcGripper, 0, -2);
746 
747  SetRect (&lpBand->rcCapImage,
748  lpBand->rcGripper.right+REBAR_ALWAYS_SPACE, lpBand->rcBand.top,
749  lpBand->rcGripper.right+REBAR_ALWAYS_SPACE, lpBand->rcBand.bottom);
750  }
751  else { /* no gripper will be drawn */
752  xoff = 0;
753  if (lpBand->fStatus & (HAS_IMAGE | HAS_TEXT))
754  /* if no gripper but either image or text, then leave space */
755  xoff = REBAR_ALWAYS_SPACE;
756  SetRect (&lpBand->rcCapImage,
757  lpBand->rcBand.left+xoff, lpBand->rcBand.top,
758  lpBand->rcBand.left+xoff, lpBand->rcBand.bottom);
759  }
760 
761  /* image is visible */
762  if (lpBand->fStatus & HAS_IMAGE) {
763  lpBand->fDraw |= DRAW_IMAGE;
764  lpBand->rcCapImage.right += infoPtr->imageSize.cx;
765  lpBand->rcCapImage.bottom = lpBand->rcCapImage.top + infoPtr->imageSize.cy;
766 
767  /* set initial caption text rectangle */
768  SetRect (&lpBand->rcCapText,
769  lpBand->rcCapImage.right+REBAR_POST_IMAGE, lpBand->rcBand.top+1,
770  lpBand->rcBand.left+lpBand->cxHeader, lpBand->rcBand.bottom-1);
771  }
772  else {
773  /* set initial caption text rectangle */
774  SetRect (&lpBand->rcCapText, lpBand->rcCapImage.right, lpBand->rcBand.top+1,
775  lpBand->rcBand.left+lpBand->cxHeader, lpBand->rcBand.bottom-1);
776  }
777 
778  /* text is visible */
779  if ((lpBand->fStatus & HAS_TEXT) && !(lpBand->fStyle & RBBS_HIDETITLE)) {
780  lpBand->fDraw |= DRAW_TEXT;
781  lpBand->rcCapText.right = max(lpBand->rcCapText.left,
783  }
784 
785  /* set initial child window rectangle if there is a child */
786  if (lpBand->hwndChild) {
787 
788  lpBand->rcChild.left = lpBand->rcBand.left + lpBand->cxHeader;
789  lpBand->rcChild.right = lpBand->rcBand.right - REBAR_POST_CHILD;
790 
791  if (lpBand->cyChild > 0) {
792 
793  UINT yoff = (lpBand->rcBand.bottom - lpBand->rcBand.top - lpBand->cyChild) / 2;
794 
795  /* center child if height is known */
796  lpBand->rcChild.top = lpBand->rcBand.top + yoff;
797  lpBand->rcChild.bottom = lpBand->rcBand.top + yoff + lpBand->cyChild;
798  }
799  else {
800  lpBand->rcChild.top = lpBand->rcBand.top;
801  lpBand->rcChild.bottom = lpBand->rcBand.bottom;
802  }
803 
804  if ((lpBand->fStyle & RBBS_USECHEVRON) && (lpBand->rcChild.right - lpBand->rcChild.left < lpBand->cxIdeal))
805  {
806  lpBand->rcChild.right -= CHEVRON_WIDTH;
807  SetRect(&lpBand->rcChevron, lpBand->rcChild.right,
808  lpBand->rcChild.top, lpBand->rcChild.right + CHEVRON_WIDTH,
809  lpBand->rcChild.bottom);
810  }
811  }
812  else {
813  SetRect (&lpBand->rcChild,
814  lpBand->rcBand.left+lpBand->cxHeader, lpBand->rcBand.top,
815  lpBand->rcBand.right, lpBand->rcBand.bottom);
816  }
817 
818  /* flag if notify required and invalidate rectangle */
819  if (lpBand->fDraw & NTF_INVALIDATE) {
820  lpBand->fDraw &= ~NTF_INVALIDATE;
821  work = lpBand->rcBand;
822  work.right += SEP_WIDTH;
823  work.bottom += SEP_WIDTH;
824  TRACE("invalidating %s\n", wine_dbgstr_rect(&work));
825  InvalidateRect(infoPtr->hwndSelf, &work, TRUE);
826  if (lpBand->hwndChild) InvalidateRect(lpBand->hwndChild, NULL, TRUE);
827  }
828 
829  }
830 
831 }
#define max(a, b)
Definition: svc.c:63
BOOL WINAPI InflateRect(_Inout_ LPRECT, _In_ int, _In_ int)
#define TRUE
Definition: types.h:120
RECT rcCapImage
Definition: rebar.c:130
RECT rcChild
Definition: rebar.c:132
#define HAS_IMAGE
Definition: rebar.c:144
#define CHEVRON_WIDTH
Definition: rebar.c:228
UINT cyChild
Definition: rebar.c:111
#define REBAR_POST_IMAGE
Definition: rebar.c:212
HWND hwndChild
Definition: rebar.c:105
LONG top
Definition: windef.h:292
#define REBAR_PRE_GRIPPER
Definition: rebar.c:221
HWND hwndSelf
Definition: rebar.c:164
LONG left
Definition: windef.h:291
RECT rcGripper
Definition: rebar.c:129
LONG right
Definition: windef.h:293
RECT rcChevron
Definition: rebar.c:133
UINT fStatus
Definition: rebar.c:125
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define NTF_INVALIDATE
Definition: rebar.c:153
UINT fStyle
Definition: rebar.c:100
smooth NULL
Definition: ftsmooth.c:416
#define REBAR_POST_TEXT
Definition: rebar.c:215
LONG cx
Definition: windef.h:319
#define RBBS_HIDETITLE
UINT fDraw
Definition: rebar.c:126
UINT cxIdeal
Definition: rebar.c:114
#define TRACE(s)
Definition: solgame.cpp:4
#define DRAW_TEXT
Definition: rebar.c:150
#define DRAW_GRIPPER
Definition: rebar.c:148
const char * wine_dbgstr_rect(const RECT *rect)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define GRIPPER_WIDTH
Definition: rebar.c:225
#define HAS_TEXT
Definition: rebar.c:145
#define REBAR_POST_CHILD
Definition: rebar.c:231
RECT rcCapText
Definition: rebar.c:131
#define RBBS_USECHEVRON
Definition: commctrl.h:1470
static REBAR_BAND * REBAR_GetBand(const REBAR_INFO *infoPtr, INT i)
Definition: rebar.c:262
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
#define DRAW_IMAGE
Definition: rebar.c:149
unsigned int UINT
Definition: ndis.h:50
SIZE imageSize
Definition: rebar.c:169
#define SEP_WIDTH
Definition: rebar.c:205
#define HAS_GRIPPER
Definition: rebar.c:143
LONG bottom
Definition: windef.h:294
RECT rcBand
Definition: rebar.c:128
UINT cxHeader
Definition: rebar.c:116
#define REBAR_ALWAYS_SPACE
Definition: rebar.c:209
LONG cy
Definition: windef.h:320
#define HIDDENBAND(a)
Definition: rebar.c:252

Referenced by REBAR_HandleLRDrag(), REBAR_Layout(), REBAR_MaximizeBand(), and REBAR_MinimizeBand().

◆ REBAR_CalcVertBand()

static VOID REBAR_CalcVertBand ( const REBAR_INFO infoPtr,
UINT  rstart,
UINT  rend 
)
static

Definition at line 835 of file rebar.c.

839 {
840  REBAR_BAND *lpBand;
841  UINT i, xoff;
842  RECT work;
843 
844  for(i=rstart; i<rend; i++){
845  RECT rcBand;
846  lpBand = REBAR_GetBand(infoPtr, i);
847  if (HIDDENBAND(lpBand)) continue;
848 
849  translate_rect(infoPtr, &rcBand, &lpBand->rcBand);
850 
851  /* set initial gripper rectangle */
852  SetRect (&lpBand->rcGripper, rcBand.left, rcBand.top, rcBand.right, rcBand.top);
853 
854  /* calculate gripper rectangle */
855  if (lpBand->fStatus & HAS_GRIPPER) {
856  lpBand->fDraw |= DRAW_GRIPPER;
857 
858  if (infoPtr->dwStyle & RBS_VERTICALGRIPPER) {
859  /* vertical gripper */
860  lpBand->rcGripper.left += 3;
861  lpBand->rcGripper.right = lpBand->rcGripper.left + GRIPPER_WIDTH;
862  lpBand->rcGripper.top += REBAR_PRE_GRIPPER;
863  lpBand->rcGripper.bottom = lpBand->rcGripper.top + GRIPPER_HEIGHT;
864 
865  /* initialize Caption image rectangle */
866  SetRect (&lpBand->rcCapImage, rcBand.left,
868  rcBand.right,
870  }
871  else {
872  /* horizontal gripper */
873  InflateRect(&lpBand->rcGripper, -2, 0);
874  lpBand->rcGripper.top += REBAR_PRE_GRIPPER;
875  lpBand->rcGripper.bottom = lpBand->rcGripper.top + GRIPPER_WIDTH;
876 
877  /* initialize Caption image rectangle */
878  SetRect (&lpBand->rcCapImage, rcBand.left,
880  rcBand.right,
882  }
883  }
884  else { /* no gripper will be drawn */
885  xoff = 0;
886  if (lpBand->fStatus & (HAS_IMAGE | HAS_TEXT))
887  /* if no gripper but either image or text, then leave space */
888  xoff = REBAR_ALWAYS_SPACE;
889  /* initialize Caption image rectangle */
890  SetRect (&lpBand->rcCapImage,
891  rcBand.left, rcBand.top+xoff,
892  rcBand.right, rcBand.top+xoff);
893  }
894 
895  /* image is visible */
896  if (lpBand->fStatus & HAS_IMAGE) {
897  lpBand->fDraw |= DRAW_IMAGE;
898 
899  lpBand->rcCapImage.right = lpBand->rcCapImage.left + infoPtr->imageSize.cx;
900  lpBand->rcCapImage.bottom += infoPtr->imageSize.cy;
901 
902  /* set initial caption text rectangle */
903  SetRect (&lpBand->rcCapText,
904  rcBand.left, lpBand->rcCapImage.bottom+REBAR_POST_IMAGE,
905  rcBand.right, rcBand.top+lpBand->cxHeader);
906  }
907  else {
908  /* set initial caption text rectangle */
909  SetRect (&lpBand->rcCapText,
910  rcBand.left, lpBand->rcCapImage.bottom,
911  rcBand.right, rcBand.top+lpBand->cxHeader);
912  }
913 
914  /* text is visible */
915  if ((lpBand->fStatus & HAS_TEXT) && !(lpBand->fStyle & RBBS_HIDETITLE)) {
916  lpBand->fDraw |= DRAW_TEXT;
917  lpBand->rcCapText.bottom = max(lpBand->rcCapText.top,
918  lpBand->rcCapText.bottom);
919  }
920 
921  /* set initial child window rectangle if there is a child */
922  if (lpBand->hwndChild) {
923  int cxBand = rcBand.right - rcBand.left;
924  xoff = (cxBand - lpBand->cyChild) / 2;
925  SetRect (&lpBand->rcChild,
926  rcBand.left + xoff, rcBand.top + lpBand->cxHeader,
927  rcBand.left + xoff + lpBand->cyChild, rcBand.bottom - REBAR_POST_CHILD);
928  }
929  else {
930  SetRect (&lpBand->rcChild,
931  rcBand.left, rcBand.top+lpBand->cxHeader,
932  rcBand.right, rcBand.bottom);
933  }
934 
935  if (lpBand->fDraw & NTF_INVALIDATE) {
936  lpBand->fDraw &= ~NTF_INVALIDATE;
937  work = rcBand;
938  work.bottom += SEP_WIDTH;
939  work.right += SEP_WIDTH;
940  TRACE("invalidating %s\n", wine_dbgstr_rect(&work));
941  InvalidateRect(infoPtr->hwndSelf, &work, TRUE);
942  if (lpBand->hwndChild) InvalidateRect(lpBand->hwndChild, NULL, TRUE);
943  }
944 
945  }
946 }
#define GRIPPER_HEIGHT
Definition: rebar.c:218
#define max(a, b)
Definition: svc.c:63
BOOL WINAPI InflateRect(_Inout_ LPRECT, _In_ int, _In_ int)
#define TRUE
Definition: types.h:120
RECT rcCapImage
Definition: rebar.c:130
DWORD dwStyle
Definition: rebar.c:170
RECT rcChild
Definition: rebar.c:132
#define HAS_IMAGE
Definition: rebar.c:144
UINT cyChild
Definition: rebar.c:111
#define REBAR_POST_IMAGE
Definition: rebar.c:212
HWND hwndChild
Definition: rebar.c:105
LONG top
Definition: windef.h:292
#define REBAR_PRE_GRIPPER
Definition: rebar.c:221
HWND hwndSelf
Definition: rebar.c:164
LONG left
Definition: windef.h:291
RECT rcGripper
Definition: rebar.c:129
LONG right
Definition: windef.h:293
UINT fStatus
Definition: rebar.c:125
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define NTF_INVALIDATE
Definition: rebar.c:153
UINT fStyle
Definition: rebar.c:100
smooth NULL
Definition: ftsmooth.c:416
LONG cx
Definition: windef.h:319
#define RBBS_HIDETITLE
UINT fDraw
Definition: rebar.c:126
#define TRACE(s)
Definition: solgame.cpp:4
#define DRAW_TEXT
Definition: rebar.c:150
#define DRAW_GRIPPER
Definition: rebar.c:148
const char * wine_dbgstr_rect(const RECT *rect)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define GRIPPER_WIDTH
Definition: rebar.c:225
#define HAS_TEXT
Definition: rebar.c:145
#define REBAR_POST_CHILD
Definition: rebar.c:231
RECT rcCapText
Definition: rebar.c:131
static void translate_rect(const REBAR_INFO *infoPtr, RECT *dest, const RECT *src)
Definition: rebar.c:434
static REBAR_BAND * REBAR_GetBand(const REBAR_INFO *infoPtr, INT i)
Definition: rebar.c:262
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
#define DRAW_IMAGE
Definition: rebar.c:149
unsigned int UINT
Definition: ndis.h:50
SIZE imageSize
Definition: rebar.c:169
#define SEP_WIDTH
Definition: rebar.c:205
#define HAS_GRIPPER
Definition: rebar.c:143
#define RBS_VERTICALGRIPPER
Definition: commctrl.h:1448
LONG bottom
Definition: windef.h:294
RECT rcBand
Definition: rebar.c:128
UINT cxHeader
Definition: rebar.c:116
#define REBAR_ALWAYS_SPACE
Definition: rebar.c:209
LONG cy
Definition: windef.h:320
#define HIDDENBAND(a)
Definition: rebar.c:252

Referenced by REBAR_HandleLRDrag(), REBAR_Layout(), REBAR_MaximizeBand(), and REBAR_MinimizeBand().

◆ REBAR_CommonSetupBand()

static UINT REBAR_CommonSetupBand ( HWND  hwnd,
const REBARBANDINFOW lprbbi,
REBAR_BAND lpBand 
)
static

Definition at line 1707 of file rebar.c.

1711 {
1712  UINT uChanged = 0x0;
1713 
1714  lpBand->fMask |= lprbbi->fMask;
1715 
1716  if( (lprbbi->fMask & RBBIM_STYLE) &&
1717  (lpBand->fStyle != lprbbi->fStyle ) )
1718  {
1719  lpBand->fStyle = lprbbi->fStyle;
1720  uChanged |= RBBIM_STYLE;
1721  }
1722 
1723  if( (lprbbi->fMask & RBBIM_COLORS) &&
1724  ( ( lpBand->clrFore != lprbbi->clrFore ) ||
1725  ( lpBand->clrBack != lprbbi->clrBack ) ) )
1726  {
1727  lpBand->clrFore = lprbbi->clrFore;
1728  lpBand->clrBack = lprbbi->clrBack;
1729  uChanged |= RBBIM_COLORS;
1730  }
1731 
1732  if( (lprbbi->fMask & RBBIM_IMAGE) &&
1733  ( lpBand->iImage != lprbbi->iImage ) )
1734  {
1735  lpBand->iImage = lprbbi->iImage;
1736  uChanged |= RBBIM_IMAGE;
1737  }
1738 
1739  if( (lprbbi->fMask & RBBIM_CHILD) &&
1740  (lprbbi->hwndChild != lpBand->hwndChild ) )
1741  {
1742  if (lprbbi->hwndChild) {
1743  lpBand->hwndChild = lprbbi->hwndChild;
1744  lpBand->hwndPrevParent =
1745  SetParent (lpBand->hwndChild, hwnd);
1746  /* below in trace from WinRAR */
1748  /* above in trace from WinRAR */
1749  }
1750  else {
1751  TRACE("child: %p prev parent: %p\n",
1752  lpBand->hwndChild, lpBand->hwndPrevParent);
1753  lpBand->hwndChild = 0;
1754  lpBand->hwndPrevParent = 0;
1755  }
1756  uChanged |= RBBIM_CHILD;
1757  }
1758 
1759  if( (lprbbi->fMask & RBBIM_CHILDSIZE) &&
1760  ( (lpBand->cxMinChild != lprbbi->cxMinChild) ||
1761  (lpBand->cyMinChild != lprbbi->cyMinChild ) ||
1762  ( (lprbbi->cbSize >= REBARBANDINFOA_V6_SIZE && (lpBand->fStyle & RBBS_VARIABLEHEIGHT)) &&
1763  ( (lpBand->cyChild != lprbbi->cyChild ) ||
1764  (lpBand->cyMaxChild != lprbbi->cyMaxChild ) ||
1765  (lpBand->cyIntegral != lprbbi->cyIntegral ) ) ) ||
1766  ( (lprbbi->cbSize < REBARBANDINFOA_V6_SIZE) &&
1767  ( (lpBand->cyChild ||
1768  lpBand->cyMaxChild ||
1769  lpBand->cyIntegral ) ) ) ) )
1770  {
1771  lpBand->cxMinChild = lprbbi->cxMinChild;
1772  lpBand->cyMinChild = lprbbi->cyMinChild;
1773  /* These fields where added in WIN32_IE == 0x400 and are set only for RBBS_VARIABLEHEIGHT bands */
1774  if (lprbbi->cbSize >= REBARBANDINFOA_V6_SIZE && (lpBand->fStyle & RBBS_VARIABLEHEIGHT)) {
1775  lpBand->cyMaxChild = lprbbi->cyMaxChild;
1776  lpBand->cyIntegral = lprbbi->cyIntegral;
1777 
1778  lpBand->cyChild = round_child_height(lpBand, lprbbi->cyChild); /* make (cyChild - cyMinChild) a multiple of cyIntergral */
1779  }
1780  else {
1781  lpBand->cyChild = lpBand->cyMinChild;
1782  lpBand->cyMaxChild = 0x7fffffff;
1783  lpBand->cyIntegral = 0;
1784  }
1785  uChanged |= RBBIM_CHILDSIZE;
1786  }
1787 
1788  if( (lprbbi->fMask & RBBIM_SIZE) &&
1789  (lpBand->cx != lprbbi->cx ) )
1790  {
1791  lpBand->cx = lprbbi->cx;
1792  uChanged |= RBBIM_SIZE;
1793  }
1794 
1795  if( (lprbbi->fMask & RBBIM_BACKGROUND) &&
1796  ( lpBand->hbmBack != lprbbi->hbmBack ) )
1797  {
1798  lpBand->hbmBack = lprbbi->hbmBack;
1799  uChanged |= RBBIM_BACKGROUND;
1800  }
1801 
1802  if( (lprbbi->fMask & RBBIM_ID) &&
1803  (lpBand->wID != lprbbi->wID ) )
1804  {
1805  lpBand->wID = lprbbi->wID;
1806  uChanged |= RBBIM_ID;
1807  }
1808 
1809  /* check for additional data */
1810  if (lprbbi->cbSize >= REBARBANDINFOA_V6_SIZE) {
1811  if( (lprbbi->fMask & RBBIM_IDEALSIZE) &&
1812  ( lpBand->cxIdeal != lprbbi->cxIdeal ) )
1813  {
1814  lpBand->cxIdeal = lprbbi->cxIdeal;
1815  uChanged |= RBBIM_IDEALSIZE;
1816  }
1817 
1818  if( (lprbbi->fMask & RBBIM_LPARAM) &&
1819  (lpBand->lParam != lprbbi->lParam ) )
1820  {
1821  lpBand->lParam = lprbbi->lParam;
1822  uChanged |= RBBIM_LPARAM;
1823  }
1824 
1825  if( (lprbbi->fMask & RBBIM_HEADERSIZE) &&
1826  (lpBand->cxHeader != lprbbi->cxHeader ) )
1827  {
1828  lpBand->cxHeader = lprbbi->cxHeader;
1829  lpBand->fStyle |= RBBS_UNDOC_FIXEDHEADER;
1830  uChanged |= RBBIM_HEADERSIZE;
1831  }
1832  }
1833 
1834  return uChanged;
1835 }
UINT cyMinChild
Definition: rebar.c:107
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define RBBIM_CHILD
Definition: commctrl.h:1478
#define SW_SHOWNOACTIVATE
Definition: winuser.h:768
#define RBBS_UNDOC_FIXEDHEADER
Definition: rebar.c:197
UINT cyChild
Definition: rebar.c:111
HWND WINAPI SetParent(_In_ HWND, _In_opt_ HWND)
#define RBBIM_HEADERSIZE
Definition: commctrl.h:1485
UINT cx
Definition: rebar.c:108
HWND hwndChild
Definition: rebar.c:105
#define RBBIM_ID
Definition: commctrl.h:1482
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define RBBIM_LPARAM
Definition: commctrl.h:1484
COLORREF clrFore
Definition: rebar.c:102
#define RBBIM_IMAGE
Definition: commctrl.h:1477
COLORREF clrBack
Definition: rebar.c:103
LPARAM lParam
Definition: rebar.c:115
UINT cxMinChild
Definition: rebar.c:106
#define RBBIM_STYLE
Definition: commctrl.h:1474
#define RBBIM_SIZE
Definition: commctrl.h:1480
INT iImage
Definition: rebar.c:104
COLORREF clrBack
Definition: commctrl.h:1521
COLORREF clrFore
Definition: commctrl.h:1520
UINT fStyle
Definition: rebar.c:100
UINT cyIntegral
Definition: rebar.c:113
#define RBBS_VARIABLEHEIGHT
Definition: commctrl.h:1467
HBITMAP hbmBack
Definition: rebar.c:109
UINT cxIdeal
Definition: rebar.c:114
#define RBBIM_COLORS
Definition: commctrl.h:1475
static int round_child_height(const REBAR_BAND *lpBand, int cyHeight)
Definition: rebar.c:464
#define TRACE(s)
Definition: solgame.cpp:4
#define RBBIM_CHILDSIZE
Definition: commctrl.h:1479
UINT fMask
Definition: rebar.c:101
UINT wID
Definition: rebar.c:110
#define SW_SHOWNORMAL
Definition: winuser.h:764
unsigned int UINT
Definition: ndis.h:50
#define REBARBANDINFOA_V6_SIZE
Definition: commctrl.h:1513
UINT cxHeader
Definition: rebar.c:116
#define RBBIM_IDEALSIZE
Definition: commctrl.h:1483
UINT cyMaxChild
Definition: rebar.c:112
HWND hwndPrevParent
Definition: rebar.c:136
#define RBBIM_BACKGROUND
Definition: commctrl.h:1481

Referenced by REBAR_InsertBandT(), and REBAR_SetBandInfoT().

◆ REBAR_Create()

static LRESULT REBAR_Create ( REBAR_INFO infoPtr,
LPCREATESTRUCTW  cs 
)
static

Definition at line 2954 of file rebar.c.

2955 {
2956  RECT wnrc1, clrc1;
2957 
2958  if (TRACE_ON(rebar)) {
2959  GetWindowRect(infoPtr->hwndSelf, &wnrc1);
2960  GetClientRect(infoPtr->hwndSelf, &clrc1);
2961  TRACE("window=(%s) client=(%s) cs=(%d,%d %dx%d)\n",
2962  wine_dbgstr_rect(&wnrc1), wine_dbgstr_rect(&clrc1),
2963  cs->x, cs->y, cs->cx, cs->cy);
2964  }
2965 
2966  TRACE("created!\n");
2967 
2968  if (OpenThemeData (infoPtr->hwndSelf, themeClass))
2969  {
2970  /* native seems to clear WS_BORDER when themed */
2971  infoPtr->dwStyle &= ~WS_BORDER;
2972  }
2973 
2974  return 0;
2975 }
DWORD dwStyle
Definition: rebar.c:170
static const WCHAR themeClass[]
Definition: rebar.c:303
HWND hwndSelf
Definition: rebar.c:164
uint32_t cs
Definition: isohybrid.c:75
#define TRACE(s)
Definition: solgame.cpp:4
const char * wine_dbgstr_rect(const RECT *rect)
HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR classlist)
Definition: system.c:835
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define WS_BORDER
Definition: pedump.c:625
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define TRACE_ON(x)
Definition: compat.h:65

Referenced by REBAR_WindowProc().

◆ REBAR_DeleteBand()

static LRESULT REBAR_DeleteBand ( REBAR_INFO infoPtr,
WPARAM  wParam 
)
static

Definition at line 2184 of file rebar.c.

2185 {
2186  UINT uBand = (UINT)wParam;
2187  REBAR_BAND *lpBand;
2188 
2189  if (uBand >= infoPtr->uNumBands)
2190  return FALSE;
2191 
2192  TRACE("deleting band %u!\n", uBand);
2193  lpBand = REBAR_GetBand(infoPtr, uBand);
2194  REBAR_Notify_NMREBAR (infoPtr, uBand, RBN_DELETINGBAND);
2195  /* TODO: a return of 1 should probably cancel the deletion */
2196 
2197  if (lpBand->hwndChild)
2198  ShowWindow(lpBand->hwndChild, SW_HIDE);
2199  Free(lpBand->lpText);
2200  Free(lpBand);
2201 
2202  infoPtr->uNumBands--;
2203  DPA_DeletePtr(infoPtr->bands, uBand);
2204 
2205  REBAR_Notify_NMREBAR (infoPtr, -1, RBN_DELETEDBAND);
2206 
2207  /* if only 1 band left the re-validate to possible eliminate gripper */
2208  if (infoPtr->uNumBands == 1)
2209  REBAR_ValidateBand (infoPtr, REBAR_GetBand(infoPtr, 0));
2210 
2211  REBAR_Layout(infoPtr);
2212 
2213  return TRUE;
2214 }
static VOID REBAR_ValidateBand(const REBAR_INFO *infoPtr, REBAR_BAND *lpBand)
Definition: rebar.c:1593
#define TRUE
Definition: types.h:120
UINT uNumBands
Definition: rebar.c:162
LPWSTR lpText
Definition: rebar.c:135
#define SW_HIDE
Definition: winuser.h:762
HWND hwndChild
Definition: rebar.c:105
static UINT
Definition: rebar.c:37
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
static INT REBAR_Notify_NMREBAR(const REBAR_INFO *infoPtr, UINT uBand, UINT code)
Definition: rebar.c:532
WPARAM wParam
Definition: combotst.c:138
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
Definition: exfuncs.h:656
#define RBN_DELETINGBAND
Definition: commctrl.h:1606
#define TRACE(s)
Definition: solgame.cpp:4
#define RBN_DELETEDBAND
Definition: commctrl.h:1607
static VOID REBAR_Layout(REBAR_INFO *infoPtr)
Definition: rebar.c:1382
static REBAR_BAND * REBAR_GetBand(const REBAR_INFO *infoPtr, INT i)
Definition: rebar.c:262
unsigned int UINT
Definition: ndis.h:50
LPVOID WINAPI DPA_DeletePtr(HDPA hdpa, INT i)
Definition: dpa.c:677
HDPA bands
Definition: rebar.c:188

Referenced by REBAR_WindowProc().

◆ REBAR_Destroy()

static LRESULT REBAR_Destroy ( REBAR_INFO infoPtr)
static

Definition at line 2979 of file rebar.c.

2980 {
2981  REBAR_BAND *lpBand;
2982  UINT i;
2983 
2984  /* clean up each band */
2985  for (i = 0; i < infoPtr->uNumBands; i++) {
2986  lpBand = REBAR_GetBand(infoPtr, i);
2987 
2988  /* delete text strings */
2989  Free (lpBand->lpText);
2990  lpBand->lpText = NULL;
2991  /* destroy child window */
2992  DestroyWindow (lpBand->hwndChild);
2993  Free (lpBand);
2994  }
2995 
2996  /* free band array */
2997  DPA_Destroy (infoPtr->bands);
2998  infoPtr->bands = NULL;
2999 
3000  DestroyCursor (infoPtr->hcurArrow);
3001  DestroyCursor (infoPtr->hcurHorz);
3002  DestroyCursor (infoPtr->hcurVert);
3003  DestroyCursor (infoPtr->hcurDrag);
3004  if (infoPtr->hDefaultFont) DeleteObject (infoPtr->hDefaultFont);
3005  SetWindowLongPtrW (infoPtr->hwndSelf, 0, 0);
3006 
3007  CloseThemeData (GetWindowTheme (infoPtr->hwndSelf));
3008 
3009  /* free rebar info data */
3010  Free (infoPtr);
3011  TRACE("destroyed!\n");
3012  return 0;
3013 }
UINT uNumBands
Definition: rebar.c:162
LPWSTR lpText
Definition: rebar.c:135
HCURSOR hcurArrow
Definition: rebar.c:176
BOOL WINAPI DPA_Destroy(HDPA hdpa)
Definition: dpa.c:396
HWND hwndChild
Definition: rebar.c:105
HWND hwndSelf
Definition: rebar.c:164
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
BOOL WINAPI DestroyWindow(_In_ HWND)
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
Definition: exfuncs.h:656
HFONT hDefaultFont
Definition: rebar.c:167
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
HCURSOR hcurVert
Definition: rebar.c:178
#define TRACE(s)
Definition: solgame.cpp:4
BOOL WINAPI DestroyCursor(_In_ HCURSOR)
Definition: cursoricon.c:2654
HTHEME WINAPI GetWindowTheme(HWND hwnd)
Definition: system.c:851
HCURSOR hcurHorz
Definition: rebar.c:177
static REBAR_BAND * REBAR_GetBand(const REBAR_INFO *infoPtr, INT i)
Definition: rebar.c:262
unsigned int UINT
Definition: ndis.h:50
#define SetWindowLongPtrW
Definition: winuser.h:5215
HCURSOR hcurDrag
Definition: rebar.c:179
HDPA bands
Definition: rebar.c:188
HRESULT WINAPI CloseThemeData(HTHEME hTheme)
Definition: system.c:950

Referenced by REBAR_WindowProc().

◆ REBAR_DrawBand()

static VOID REBAR_DrawBand ( HDC  hdc,
const REBAR_INFO infoPtr,
REBAR_BAND lpBand 
)
static

Definition at line 558 of file rebar.c.

559 {
560  HFONT hOldFont = 0;
561  INT oldBkMode = 0;
562  NMCUSTOMDRAW nmcd;
563  HTHEME theme = GetWindowTheme (infoPtr->hwndSelf);
564  RECT rcBand;
565 
566  translate_rect(infoPtr, &rcBand, &lpBand->rcBand);
567 
568  if (lpBand->fDraw & DRAW_TEXT) {
569  hOldFont = SelectObject (hdc, infoPtr->hFont);
570  oldBkMode = SetBkMode (hdc, TRANSPARENT);
571  }
572 
573  /* should test for CDRF_NOTIFYITEMDRAW here */
575  nmcd.hdc = hdc;
576  nmcd.rc = rcBand;
577  nmcd.rc.right = lpBand->rcCapText.right;
578  nmcd.rc.bottom = lpBand->rcCapText.bottom;
579  nmcd.dwItemSpec = lpBand->wID;
580  nmcd.uItemState = 0;
581  nmcd.lItemlParam = lpBand->lParam;
582  lpBand->uCDret = REBAR_Notify ((NMHDR *)&nmcd, infoPtr, NM_CUSTOMDRAW);
583  if (lpBand->uCDret == CDRF_SKIPDEFAULT) {
584  if (oldBkMode != TRANSPARENT)
585  SetBkMode (hdc, oldBkMode);
586  SelectObject (hdc, hOldFont);
587  return;
588  }
589 
590  /* draw gripper */
591  if (lpBand->fDraw & DRAW_GRIPPER)
592  {
593  if (theme)
594  {
595  RECT rcGripper = lpBand->rcGripper;
596  int partId = (infoPtr->dwStyle & CCS_VERT) ? RP_GRIPPERVERT : RP_GRIPPER;
597  GetThemeBackgroundExtent (theme, hdc, partId, 0, &rcGripper, &rcGripper);
598  OffsetRect (&rcGripper, lpBand->rcGripper.left - rcGripper.left,
599  lpBand->rcGripper.top - rcGripper.top);
600  DrawThemeBackground (theme, hdc, partId, 0, &rcGripper, NULL);
601  }
602  else
604  }
605 
606  /* draw caption image */
607  if (lpBand->fDraw & DRAW_IMAGE) {
608  POINT pt;
609 
610  /* center image */
611  pt.y = (lpBand->rcCapImage.bottom + lpBand->rcCapImage.top - infoPtr->imageSize.cy)/2;
612  pt.x = (lpBand->rcCapImage.right + lpBand->rcCapImage.left - infoPtr->imageSize.cx)/2;
613 
614  ImageList_Draw (infoPtr->himl, lpBand->iImage, hdc,
615  pt.x, pt.y,
617  }
618 
619  /* draw caption text */
620  if (lpBand->fDraw & DRAW_TEXT) {
621  /* need to handle CDRF_NEWFONT here */
622  INT oldBkMode = SetBkMode (hdc, TRANSPARENT);
623  COLORREF oldcolor = CLR_NONE;
624  COLORREF new;
625  if (lpBand->clrFore != CLR_NONE) {
626  new = (lpBand->clrFore == CLR_DEFAULT) ? infoPtr->clrBtnText :
627  lpBand->clrFore;
628  oldcolor = SetTextColor (hdc, new);
629  }
630 
631 #ifdef __REACTOS__
632  if (!theme)
633  {
634  DrawTextW (hdc, lpBand->lpText, -1, &lpBand->rcCapText, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
635  }
636  else
637  {
638  DrawThemeText(theme, hdc, 0, 0, lpBand->lpText, -1, DT_CENTER | DT_VCENTER | DT_SINGLELINE, 0, &lpBand->rcCapText);
639  }
640 #else
641  DrawTextW (hdc, lpBand->lpText, -1, &lpBand->rcCapText,
643 #endif
644 
645  if (oldBkMode != TRANSPARENT)
646  SetBkMode (hdc, oldBkMode);
647  if (lpBand->clrFore != CLR_NONE)
648  SetTextColor (hdc, oldcolor);
649  SelectObject (hdc, hOldFont);
650  }
651 
652  if (!IsRectEmpty(&lpBand->rcChevron))
653  {
654  if (theme)
655  {
656  int stateId;
657  if (lpBand->fDraw & DRAW_CHEVRONPUSHED)
658  stateId = CHEVS_PRESSED;
659  else if (lpBand->fDraw & DRAW_CHEVRONHOT)
660  stateId = CHEVS_HOT;
661  else
662  stateId = CHEVS_NORMAL;
663  DrawThemeBackground (theme, hdc, RP_CHEVRON, stateId, &lpBand->rcChevron, NULL);
664  }
665  else
666  {
667  if (lpBand->fDraw & DRAW_CHEVRONPUSHED)
668  {
671  }
672  else if (lpBand->fDraw & DRAW_CHEVRONHOT)
673  {
676  }
677  else
679  }
680  }
681 
682  if (lpBand->uCDret == (CDRF_NOTIFYPOSTPAINT | CDRF_NOTIFYITEMDRAW)) {
684  nmcd.hdc = hdc;
685  nmcd.rc = rcBand;
686  nmcd.rc.right = lpBand->rcCapText.right;
687  nmcd.rc.bottom = lpBand->rcCapText.bottom;
688  nmcd.dwItemSpec = lpBand->wID;
689  nmcd.uItemState = 0;
690  nmcd.lItemlParam = lpBand->lParam;
691  lpBand->uCDret = REBAR_Notify ((NMHDR *)&nmcd, infoPtr, NM_CUSTOMDRAW);
692  }
693 }
#define BF_MIDDLE
Definition: winuser.h:468
RECT rcCapImage
Definition: rebar.c:130
DWORD dwStyle
Definition: rebar.c:170
#define COLOR_WINDOWFRAME
Definition: winuser.h:909
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)
LPWSTR lpText
Definition: rebar.c:135
#define CDRF_NOTIFYPOSTPAINT
Definition: commctrl.h:259
#define pt(x, y)
Definition: drawing.c:79
UINT uCDret
Definition: rebar.c:127
LONG top
Definition: windef.h:292
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
#define CDDS_ITEMPREPAINT
Definition: commctrl.h:270
static HTHEME(WINAPI *pOpenThemeDataEx)(HWND
HWND hwndSelf
Definition: rebar.c:164
BOOL WINAPI ImageList_Draw(HIMAGELIST himl, INT i, HDC hdc, INT x, INT y, UINT fStyle)
Definition: imagelist.c:1225
LONG left
Definition: windef.h:291
RECT rcGripper
Definition: rebar.c:129
static void REBAR_DrawChevron(HDC hdc, INT left, INT top, INT colorRef)
Definition: rebar.c:482
#define CDRF_SKIPDEFAULT
Definition: commctrl.h:255
LONG right
Definition: windef.h:293
HRESULT WINAPI DrawThemeBackground(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect)
Definition: draw.c:128
int32_t INT
Definition: typedefs.h:56
COLORREF clrFore
Definition: rebar.c:102
RECT rcChevron
Definition: rebar.c:133
#define DRAW_CHEVRONPUSHED
Definition: rebar.c:152
#define CCS_VERT
Definition: commctrl.h:2221
LPARAM lParam
Definition: rebar.c:115
#define BF_RECT
Definition: winuser.h:462
int WINAPI SetBkMode(_In_ HDC, _In_ int)
Definition: dc.c:1032
INT iImage
Definition: rebar.c:104
#define DRAW_CHEVRONHOT
Definition: rebar.c:151
BOOL WINAPI DrawEdge(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
#define TRANSPARENT
Definition: wingdi.h:949
COLORREF clrBtnText
Definition: rebar.c:159
BOOL WINAPI IsRectEmpty(_In_ LPCRECT)
smooth NULL
Definition: ftsmooth.c:416
LONG cx
Definition: windef.h:319
HIMAGELIST himl
Definition: rebar.c:161
#define CDRF_NOTIFYITEMDRAW
Definition: commctrl.h:260
#define CLR_NONE
Definition: commctrl.h:304
#define DT_VCENTER
Definition: winuser.h:543
static INT REBAR_Notify(NMHDR *nmhdr, const REBAR_INFO *infoPtr, UINT code)
Definition: rebar.c:517
UINT fDraw
Definition: rebar.c:126
HRESULT WINAPI GetThemeBackgroundExtent(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pContentRect, RECT *pExtentRect)
Definition: draw.c:1528
#define DRAW_TEXT
Definition: rebar.c:150
DWORD COLORREF
Definition: windef.h:285
#define DRAW_GRIPPER
Definition: rebar.c:148
HTHEME WINAPI GetWindowTheme(HWND hwnd)
Definition: system.c:851
RECT rcCapText
Definition: rebar.c:131
#define NM_CUSTOMDRAW
Definition: commctrl.h:137
HDC hdc
Definition: main.c:9
static void translate_rect(const REBAR_INFO *infoPtr, RECT *dest, const RECT *src)
Definition: rebar.c:434
UINT wID
Definition: rebar.c:110
#define BDR_SUNKENOUTER
Definition: winuser.h:443
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
Definition: text.c:886
#define ILD_TRANSPARENT
Definition: commctrl.h:403
#define DT_SINGLELINE
Definition: winuser.h:540
DWORD_PTR dwItemSpec
Definition: commctrl.h:292
#define DRAW_IMAGE
Definition: rebar.c:149
SIZE imageSize
Definition: rebar.c:169
#define CLR_DEFAULT
Definition: commctrl.h:305
HFONT hFont
Definition: rebar.c:168
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
LONG bottom
Definition: windef.h:294
#define DT_CENTER
Definition: winuser.h:527
#define BDR_RAISEDINNER
Definition: winuser.h:444
#define CDDS_ITEMPOSTPAINT
Definition: commctrl.h:271
RECT rcBand
Definition: rebar.c:128
LONG cy
Definition: windef.h:320
HRESULT WINAPI DrawThemeText(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, LPCWSTR pszText, int iCharCount, DWORD dwTextFlags, DWORD dwTextFlags2, const RECT *pRect)
Definition: draw.c:1377
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
Definition: defwnd.c:17

Referenced by REBAR_Refresh().

◆ REBAR_DrawChevron()

static void REBAR_DrawChevron ( HDC  hdc,
INT  left,
INT  top,
INT  colorRef 
)
static

Definition at line 482 of file rebar.c.

483 {
484  INT x, y;
485  HPEN hPen, hOldPen;
486 
487  if (!(hPen = CreatePen( PS_SOLID, 1, GetSysColor( colorRef )))) return;
488  hOldPen = SelectObject ( hdc, hPen );
489  x = left + 2;
490  y = top;
491  MoveToEx (hdc, x, y, NULL);
492  LineTo (hdc, x+5, y++); x++;
493  MoveToEx (hdc, x, y, NULL);
494  LineTo (hdc, x+3, y++); x++;
495  MoveToEx (hdc, x, y, NULL);
496  LineTo (hdc, x+1, y);
497  SelectObject( hdc, hOldPen );
498  DeleteObject( hPen );
499 }
HPEN WINAPI CreatePen(_In_ int, _In_ int, _In_ COLORREF)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
BOOL WINAPI LineTo(_In_ HDC, _In_ int, _In_ int)
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
int32_t INT
Definition: typedefs.h:56
DWORD WINAPI GetSysColor(_In_ int)
BOOL WINAPI MoveToEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
#define PS_SOLID
Definition: wingdi.h:585
smooth NULL
Definition: ftsmooth.c:416
GLint left
Definition: glext.h:7726
HDC hdc
Definition: main.c:9
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859

Referenced by REBAR_DrawBand().

◆ REBAR_DumpBand()

static VOID REBAR_DumpBand ( const REBAR_INFO iP)
static

Definition at line 373 of file rebar.c.

374 {
375  REBAR_BAND *pB;
376  UINT i;
377 
378  if(! TRACE_ON(rebar) ) return;
379 
380  TRACE("hwnd=%p: color=%08x/%08x, bands=%u, rows=%u, cSize=%d,%d\n",
381  iP->hwndSelf, iP->clrText, iP->clrBk, iP->uNumBands, iP->uNumRows,
382  iP->calcSize.cx, iP->calcSize.cy);
383  TRACE("hwnd=%p: flags=%08x, dragStart=%d,%d, dragNow=%d,%d, iGrabbedBand=%d\n",
384  iP->hwndSelf, iP->fStatus, iP->dragStart.x, iP->dragStart.y,
385  iP->dragNow.x, iP->dragNow.y,
386  iP->iGrabbedBand);
387  TRACE("hwnd=%p: style=%08x, notify in Unicode=%s, redraw=%s\n",
388  iP->hwndSelf, iP->dwStyle, (iP->bUnicode)?"TRUE":"FALSE",
389  (iP->DoRedraw)?"TRUE":"FALSE");
390  for (i = 0; i < iP->uNumBands; i++) {
391  pB = REBAR_GetBand(iP, i);
392  TRACE("band # %u:", i);
393  if (pB->fMask & RBBIM_ID)
394  TRACE(" ID=%u", pB->wID);
395  if (pB->fMask & RBBIM_CHILD)
396  TRACE(" child=%p", pB->hwndChild);
397  if (pB->fMask & RBBIM_COLORS)
398  TRACE(" clrF=0x%06x clrB=0x%06x", pB->clrFore, pB->clrBack);
399  TRACE("\n");
400  TRACE("band # %u: mask=0x%08x (%s)\n", i, pB->fMask, REBAR_FmtMask(pB->fMask));
401  if (pB->fMask & RBBIM_STYLE)
402  TRACE("band # %u: style=0x%08x (%s)\n",
403  i, pB->fStyle, REBAR_FmtStyle(pB->fStyle));
404  TRACE("band # %u: xHeader=%u",
405  i, pB->cxHeader);
406  if (pB->fMask & (RBBIM_SIZE | RBBIM_IDEALSIZE | RBBIM_LPARAM )) {
407  if (pB->fMask & RBBIM_SIZE)
408  TRACE(" cx=%u", pB->cx);
409  if (pB->fMask & RBBIM_IDEALSIZE)
410  TRACE(" xIdeal=%u", pB->cxIdeal);
411  if (pB->fMask & RBBIM_LPARAM)
412  TRACE(" lParam=0x%08lx", pB->lParam);
413  }
414  TRACE("\n");
415  if (RBBIM_CHILDSIZE)
416  TRACE("band # %u: xMin=%u, yMin=%u, yChild=%u, yMax=%u, yIntgl=%u\n",
417  i, pB->cxMinChild, pB->cyMinChild, pB->cyChild, pB->cyMaxChild, pB->cyIntegral);
418  if (pB->fMask & RBBIM_TEXT)
419  TRACE("band # %u: text=%s\n",
420  i, (pB->lpText) ? debugstr_w(pB->lpText) : "(null)");
421  TRACE("band # %u: cxMinBand=%u, cxEffective=%u, cyMinBand=%u\n",
422  i, pB->cxMinBand, pB->cxEffective, pB->cyMinBand);
423  TRACE("band # %u: fStatus=%08x, fDraw=%08x, Band=(%s), Grip=(%s)\n",
424  i, pB->fStatus, pB->fDraw, wine_dbgstr_rect(&pB->rcBand),
426  TRACE("band # %u: Img=(%s), Txt=(%s), Child=(%s)\n",
429  }
430 
431 }
UINT cyMinChild
Definition: rebar.c:107
UINT cyMinBand
Definition: rebar.c:121
RECT rcCapImage
Definition: rebar.c:130
DWORD dwStyle
Definition: rebar.c:170
RECT rcChild
Definition: rebar.c:132
#define RBBIM_CHILD
Definition: commctrl.h:1478
long y
Definition: polytest.cpp:48
BOOL bUnicode
Definition: rebar.c:173
UINT uNumBands
Definition: rebar.c:162
LPWSTR lpText
Definition: rebar.c:135
long x
Definition: polytest.cpp:48
COLORREF clrBk
Definition: rebar.c:157
INT cxEffective
Definition: rebar.c:118
UINT cyChild
Definition: rebar.c:111
UINT cx
Definition: rebar.c:108
INT iGrabbedBand
Definition: rebar.c:186
static CHAR * REBAR_FmtMask(UINT mask)
Definition: rebar.c:323
HWND hwndChild
Definition: rebar.c:105
#define RBBIM_ID
Definition: commctrl.h:1482
HWND hwndSelf
Definition: rebar.c:164
SIZE calcSize
Definition: rebar.c:172
RECT rcGripper
Definition: rebar.c:129
#define RBBIM_LPARAM
Definition: commctrl.h:1484
COLORREF clrFore
Definition: rebar.c:102
COLORREF clrBack
Definition: rebar.c:103
BOOL DoRedraw
Definition: rebar.c:174
LPARAM lParam
Definition: rebar.c:115
UINT cxMinChild
Definition: rebar.c:106
COLORREF clrText
Definition: rebar.c:158
#define RBBIM_STYLE
Definition: commctrl.h:1474
#define RBBIM_SIZE
Definition: commctrl.h:1480
UINT fStatus
Definition: rebar.c:125
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define debugstr_w
Definition: kernel32.h:32
UINT fStyle
Definition: rebar.c:100
UINT cyIntegral
Definition: rebar.c:113
UINT uNumRows
Definition: rebar.c:163
LONG cx
Definition: windef.h:319
UINT fDraw
Definition: rebar.c:126
UINT cxIdeal
Definition: rebar.c:114
#define RBBIM_COLORS
Definition: commctrl.h:1475
#define TRACE(s)
Definition: solgame.cpp:4
#define RBBIM_TEXT
Definition: commctrl.h:1476
UINT cxMinBand
Definition: rebar.c:120
const char * wine_dbgstr_rect(const RECT *rect)
#define RBBIM_CHILDSIZE
Definition: commctrl.h:1479
RECT rcCapText
Definition: rebar.c:131
UINT fMask
Definition: rebar.c:101
UINT wID
Definition: rebar.c:110
POINT dragNow
Definition: rebar.c:182
static REBAR_BAND * REBAR_GetBand(const REBAR_INFO *infoPtr, INT i)
Definition: rebar.c:262
POINT dragStart
Definition: rebar.c:181
unsigned int UINT
Definition: ndis.h:50
static CHAR * REBAR_FmtStyle(UINT style)
Definition: rebar.c:306
RECT rcBand
Definition: rebar.c:128
UINT cxHeader
Definition: rebar.c:116
#define TRACE_ON(x)
Definition: compat.h:65
LONG cy
Definition: windef.h:320
#define RBBIM_IDEALSIZE
Definition: commctrl.h:1483
UINT fStatus
Definition: rebar.c:175
UINT cyMaxChild
Definition: rebar.c:112

Referenced by REBAR_InsertBandT(), REBAR_Layout(), REBAR_MoveBand(), and REBAR_SetBandInfoT().

◆ REBAR_DumpBandInfo()

static VOID REBAR_DumpBandInfo ( const REBARBANDINFOW pB)
static

Definition at line 340 of file rebar.c.

341 {
342  if( !TRACE_ON(rebar) ) return;
343  TRACE("band info: ");
344  if (pB->fMask & RBBIM_ID)
345  TRACE("ID=%u, ", pB->wID);
346  TRACE("size=%u, child=%p", pB->cbSize, pB->hwndChild);
347  if (pB->fMask & RBBIM_COLORS)
348  TRACE(", clrF=0x%06x, clrB=0x%06x", pB->clrFore, pB->clrBack);
349  TRACE("\n");
350 
351  TRACE("band info: mask=0x%08x (%s)\n", pB->fMask, REBAR_FmtMask(pB->fMask));
352  if (pB->fMask & RBBIM_STYLE)
353  TRACE("band info: style=0x%08x (%s)\n", pB->fStyle, REBAR_FmtStyle(pB->fStyle));
355  TRACE("band info:");
356  if (pB->fMask & RBBIM_SIZE)
357  TRACE(" cx=%u", pB->cx);
358  if (pB->fMask & RBBIM_IDEALSIZE)
359  TRACE(" xIdeal=%u", pB->cxIdeal);
360  if (pB->fMask & RBBIM_HEADERSIZE)
361  TRACE(" xHeader=%u", pB->cxHeader);
362  if (pB->fMask & RBBIM_LPARAM)
363  TRACE(" lParam=0x%08lx", pB->lParam);
364  TRACE("\n");
365  }
366  if (pB->fMask & RBBIM_CHILDSIZE)
367  TRACE("band info: xMin=%u, yMin=%u, yChild=%u, yMax=%u, yIntgl=%u\n",
368  pB->cxMinChild,
369  pB->cyMinChild, pB->cyChild, pB->cyMaxChild, pB->cyIntegral);
370 }
#define RBBIM_HEADERSIZE
Definition: commctrl.h:1485
static CHAR * REBAR_FmtMask(UINT mask)
Definition: rebar.c:323
#define RBBIM_ID
Definition: commctrl.h:1482
#define RBBIM_LPARAM
Definition: commctrl.h:1484
#define RBBIM_STYLE
Definition: commctrl.h:1474
#define RBBIM_SIZE
Definition: commctrl.h:1480
COLORREF clrBack
Definition: commctrl.h:1521
COLORREF clrFore
Definition: commctrl.h:1520
#define RBBIM_COLORS
Definition: commctrl.h:1475
#define TRACE(s)
Definition: solgame.cpp:4
#define RBBIM_CHILDSIZE
Definition: commctrl.h:1479
static CHAR * REBAR_FmtStyle(UINT style)
Definition: rebar.c:306
#define TRACE_ON(x)
Definition: compat.h:65
#define RBBIM_IDEALSIZE
Definition: commctrl.h:1483

Referenced by REBAR_GetBandInfoT(), REBAR_InsertBandT(), and REBAR_SetBandInfoT().

◆ REBAR_EraseBkGnd()

static LRESULT REBAR_EraseBkGnd ( const REBAR_INFO infoPtr,
HDC  hdc 
)
static

Definition at line 1837 of file rebar.c.

1842 {
1843  REBAR_BAND *lpBand;
1844  UINT i;
1845  INT oldrow;
1846  RECT cr;
1847  COLORREF old = CLR_NONE, new;
1848  HTHEME theme = GetWindowTheme (infoPtr->hwndSelf);
1849 
1850  GetClientRect (infoPtr->hwndSelf, &cr);
1851 
1852 #ifdef __REACTOS__
1853  if (theme)
1854  {
1855  if (IsThemeBackgroundPartiallyTransparent(theme, 0, 0))
1856  {
1857  DrawThemeParentBackground (infoPtr->hwndSelf, hdc, &cr);
1858  }
1859  DrawThemeBackground (theme, hdc, 0, 0, &cr, NULL);
1860  }
1861 #endif
1862 
1863  oldrow = -1;
1864  for(i=0; i<infoPtr->uNumBands; i++) {
1865  RECT rcBand;
1866  lpBand = REBAR_GetBand(infoPtr, i);
1867  if (HIDDENBAND(lpBand)) continue;
1868  translate_rect(infoPtr, &rcBand, &lpBand->rcBand);
1869 
1870  /* draw band separator between rows */
1871  if (lpBand->iRow != oldrow) {
1872  oldrow = lpBand->iRow;
1873  if (infoPtr->dwStyle & RBS_BANDBORDERS) {
1874  RECT rcRowSep;
1875  rcRowSep = rcBand;
1876  if (infoPtr->dwStyle & CCS_VERT) {
1877  rcRowSep.right += SEP_WIDTH_SIZE;
1878  rcRowSep.bottom = infoPtr->calcSize.cx;
1879  if (theme)
1880  DrawThemeEdge (theme, hdc, RP_BAND, 0, &rcRowSep, EDGE_ETCHED, BF_RIGHT, NULL);
1881  else
1882  DrawEdge (hdc, &rcRowSep, EDGE_ETCHED, BF_RIGHT);
1883  }
1884  else {
1885  rcRowSep.bottom += SEP_WIDTH_SIZE;
1886  rcRowSep.right = infoPtr->calcSize.cx;
1887  if (theme)
1888  DrawThemeEdge (theme, hdc, RP_BAND, 0, &rcRowSep, EDGE_ETCHED, BF_BOTTOM, NULL);
1889  else
1890  DrawEdge (hdc, &rcRowSep, EDGE_ETCHED, BF_BOTTOM);
1891  }
1892  TRACE ("drawing band separator bottom (%s)\n",
1893  wine_dbgstr_rect(&rcRowSep));
1894  }
1895  }
1896 
1897  /* draw band separator between bands in a row */
1898  if (infoPtr->dwStyle & RBS_BANDBORDERS && lpBand->rcBand.left > 0) {
1899  RECT rcSep;
1900  rcSep = rcBand;
1901  if (infoPtr->dwStyle & CCS_VERT) {
1902  rcSep.bottom = rcSep.top;
1903  rcSep.top -= SEP_WIDTH_SIZE;
1904  if (theme)
1905  DrawThemeEdge (theme, hdc, RP_BAND, 0, &rcSep, EDGE_ETCHED, BF_BOTTOM, NULL);
1906  else
1907  DrawEdge (hdc, &rcSep, EDGE_ETCHED, BF_BOTTOM);
1908  }
1909  else {
1910  rcSep.right = rcSep.left;
1911  rcSep.left -= SEP_WIDTH_SIZE;
1912  if (theme)
1913  DrawThemeEdge (theme, hdc, RP_BAND, 0, &rcSep, EDGE_ETCHED, BF_RIGHT, NULL);
1914  else
1915  DrawEdge (hdc, &rcSep, EDGE_ETCHED, BF_RIGHT);
1916  }
1917  TRACE("drawing band separator right (%s)\n",
1918  wine_dbgstr_rect(&rcSep));
1919  }
1920 
1921  /* draw the actual background */
1922  if (lpBand->clrBack != CLR_NONE) {
1923  new = (lpBand->clrBack == CLR_DEFAULT) ? infoPtr->clrBtnFace :
1924  lpBand->clrBack;
1925 #if GLATESTING
1926  /* testing only - make background green to see it */
1927  new = RGB(0,128,0);
1928 #endif
1929  }
1930  else {
1931  /* In the absence of documentation for Rebar vs. CLR_NONE,
1932  * we will use the default BtnFace color. Note documentation
1933  * exists for Listview and Imagelist.
1934  */
1935  new = infoPtr->clrBtnFace;
1936 #if GLATESTING
1937  /* testing only - make background green to see it */
1938  new = RGB(0,128,0);
1939 #endif
1940  }
1941 
1942  if (theme)
1943  {
1944  /* When themed, the background color is ignored (but not a
1945  * background bitmap */
1946  DrawThemeBackground (theme, hdc, 0, 0, &cr, &rcBand);
1947  }
1948  else
1949  {
1950  old = SetBkColor (hdc, new);
1951  TRACE("%s background color=0x%06x, band %s\n",
1952  (lpBand->clrBack == CLR_NONE) ? "none" :
1953  ((lpBand->clrBack == CLR_DEFAULT) ? "dft" : ""),
1954  GetBkColor(hdc), wine_dbgstr_rect(&rcBand));
1955  ExtTextOutW (hdc, 0, 0, ETO_OPAQUE, &rcBand, NULL, 0, 0);
1956  if (lpBand->clrBack != CLR_NONE)
1957  SetBkColor (hdc, old);
1958  }
1959  }
1960  return TRUE;
1961 }
BOOL WINAPI ExtTextOutW(_In_ HDC hdc, _In_ int x, _In_ int y, _In_ UINT options, _In_opt_ const RECT *lprect, _In_reads_opt_(c) LPCWSTR lpString, _In_ UINT c, _In_reads_opt_(c) const INT *lpDx)
COLORREF WINAPI GetBkColor(_In_ HDC)
Definition: dc.c:954
#define TRUE
Definition: types.h:120
DWORD dwStyle
Definition: rebar.c:170
UINT uNumBands
Definition: rebar.c:162
HRESULT WINAPI DrawThemeEdge(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pDestRect, UINT uEdge, UINT uFlags, RECT *pContentRect)
Definition: draw.c:1342
#define BF_BOTTOM
Definition: winuser.h:457
LONG top
Definition: windef.h:292
static HTHEME(WINAPI *pOpenThemeDataEx)(HWND
HWND hwndSelf
Definition: rebar.c:164
LONG left
Definition: windef.h:291
SIZE calcSize
Definition: rebar.c:172
COLORREF clrBtnFace
Definition: rebar.c:160
LONG right
Definition: windef.h:293
HRESULT WINAPI DrawThemeBackground(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect)
Definition: draw.c:128
int32_t INT
Definition: typedefs.h:56
COLORREF clrBack
Definition: rebar.c:103
#define CCS_VERT
Definition: commctrl.h:2221
#define RBS_BANDBORDERS
Definition: commctrl.h:1444
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
Definition: dc.c:975
BOOL WINAPI IsThemeBackgroundPartiallyTransparent(HTHEME hTheme, int iPartId, int iStateId)
Definition: draw.c:1883
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define ETO_OPAQUE
Definition: wingdi.h:646
BOOL WINAPI DrawEdge(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
smooth NULL
Definition: ftsmooth.c:416
LONG cx
Definition: windef.h:319
#define CLR_NONE
Definition: commctrl.h:304
INT iRow
Definition: rebar.c:124
HRESULT WINAPI DrawThemeParentBackground(HWND hwnd, HDC hdc, RECT *prc)
Definition: draw.c:72
#define TRACE(s)
Definition: solgame.cpp:4
#define SEP_WIDTH_SIZE
Definition: rebar.c:204
#define BF_RIGHT
Definition: winuser.h:456
DWORD COLORREF
Definition: windef.h:285
#define RGB(r, g, b)
Definition: wingdi.h:2918
const char * wine_dbgstr_rect(const RECT *rect)
#define EDGE_ETCHED
Definition: winuser.h:452
HTHEME WINAPI GetWindowTheme(HWND hwnd)
Definition: system.c:851
#define GLATESTING
Definition: rebar.c:71
HDC hdc
Definition: main.c:9
static void translate_rect(const REBAR_INFO *infoPtr, RECT *dest, const RECT *src)
Definition: rebar.c:434
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
static REBAR_BAND * REBAR_GetBand(const REBAR_INFO *infoPtr, INT i)
Definition: rebar.c:262
unsigned int UINT
Definition: ndis.h:50
#define CLR_DEFAULT
Definition: commctrl.h:305
LONG bottom
Definition: windef.h:294
RECT rcBand
Definition: rebar.c:128
#define HIDDENBAND(a)
Definition: rebar.c:252

Referenced by REBAR_Paint(), and REBAR_WindowProc().

◆ REBAR_FindBandToGrow()

static REBAR_BAND* REBAR_FindBandToGrow ( const REBAR_INFO infoPtr,
INT  iBeginBand,
INT  iEndBand 
)
static

Definition at line 1186 of file rebar.c.

1187 {
1188  INT cxMinFirstBand = 0, i;
1189 
1190  cxMinFirstBand = REBAR_GetBand(infoPtr, iBeginBand)->cxMinBand;
1191 
1192  for (i = prev_visible(infoPtr, iEndBand); i >= iBeginBand; i = prev_visible(infoPtr, i))
1193  if (REBAR_GetBand(infoPtr, i)->cxEffective > cxMinFirstBand &&
1194  !(REBAR_GetBand(infoPtr, i)->fStyle & RBBS_FIXEDSIZE))
1195  break;
1196 
1197  if (i < iBeginBand)
1198  for (i = prev_visible(infoPtr, iEndBand); i >= iBeginBand; i = prev_visible(infoPtr, i))
1199  if (REBAR_GetBand(infoPtr, i)->cxMinBand == cxMinFirstBand)
1200  break;
1201 
1202  TRACE("Extra space for row [%d..%d) should be added to band %d\n", iBeginBand, iEndBand, i);
1203  return REBAR_GetBand(infoPtr, i);
1204 }
INT cxEffective
Definition: rebar.c:118
int32_t INT
Definition: typedefs.h:56
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
UINT fStyle
Definition: rebar.c:100
#define TRACE(s)
Definition: solgame.cpp:4
static int prev_visible(const REBAR_INFO *infoPtr, int i)
Definition: rebar.c:1123
UINT cxMinBand
Definition: rebar.c:120
#define RBBS_FIXEDSIZE
Definition: commctrl.h:1462
static REBAR_BAND * REBAR_GetBand(const REBAR_INFO *infoPtr, INT i)
Definition: rebar.c:262

Referenced by REBAR_LayoutRow().

◆ REBAR_FmtMask()

static CHAR* REBAR_FmtMask ( UINT  mask)
static

Definition at line 323 of file rebar.c.

324 {
325  INT i = 0;
326 
327  *line = 0;
328  while (band_maskname[i]) {
329  if (mask & (1<<i)) {
330  if (*line != 0) strcat(line, " | ");
332  }
333  i++;
334  }
335  return line;
336 }
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
int32_t INT
Definition: typedefs.h:56
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLenum GLint GLuint mask
Definition: glext.h:6028
Definition: parser.c:48
static CHAR line[200]
Definition: rebar.c:301
static const char *const band_maskname[]
Definition: rebar.c:285

Referenced by REBAR_DumpBand(), and REBAR_DumpBandInfo().

◆ REBAR_FmtStyle()

static CHAR* REBAR_FmtStyle ( UINT  style)
static

Definition at line 306 of file rebar.c.

307 {
308  INT i = 0;
309 
310  *line = 0;
311  while (band_stylename[i]) {
312  if (style & (1<<i)) {
313  if (*line != 0) strcat(line, " | ");
315  }
316  i++;
317  }
318  return line;
319 }
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
int32_t INT
Definition: typedefs.h:56
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
Definition: parser.c:48
static const char *const band_stylename[]
Definition: rebar.c:273
static CHAR line[200]
Definition: rebar.c:301
Arabic default style
Definition: afstyles.h:93

Referenced by REBAR_DumpBand(), and REBAR_DumpBandInfo().

◆ REBAR_ForceResize()

static VOID REBAR_ForceResize ( REBAR_INFO infoPtr)
static

Definition at line 950 of file rebar.c.

953 {
954  INT x, y, width, height;
955  INT xedge = 0, yedge = 0;
956  RECT rcSelf;
957 
958  TRACE("new size [%d x %d]\n", infoPtr->calcSize.cx, infoPtr->calcSize.cy);
959 
960  if (infoPtr->dwStyle & CCS_NORESIZE)
961  return;
962 
963  if (infoPtr->dwStyle & WS_BORDER)
964  {
965  xedge = GetSystemMetrics(SM_CXEDGE);
966  yedge = GetSystemMetrics(SM_CYEDGE);
967  /* swap for CCS_VERT? */
968  }
969 
970  /* compute rebar window rect in parent client coordinates */
971  GetWindowRect(infoPtr->hwndSelf, &rcSelf);
972  MapWindowPoints(HWND_DESKTOP, GetParent(infoPtr->hwndSelf), (LPPOINT)&rcSelf, 2);
973  translate_rect(infoPtr, &rcSelf, &rcSelf);
974 
975  height = infoPtr->calcSize.cy + 2*yedge;
976  if (!(infoPtr->dwStyle & CCS_NOPARENTALIGN)) {
977  RECT rcParent;
978 
979  x = -xedge;
980  width = infoPtr->calcSize.cx + 2*xedge;
981  y = 0; /* quiet compiler warning */
982  switch ( infoPtr->dwStyle & CCS_LAYOUT_MASK) {
983  case 0: /* shouldn't happen - see NCCreate */
984  case CCS_TOP:
985  y = ((infoPtr->dwStyle & CCS_NODIVIDER) ? 0 : REBAR_DIVIDER) - yedge;
986  break;
987  case CCS_NOMOVEY:
988  y = rcSelf.top;
989  break;
990  case CCS_BOTTOM:
991  GetClientRect(GetParent(infoPtr->hwndSelf), &rcParent);
992  translate_rect(infoPtr, &rcParent, &rcParent);
993  y = rcParent.bottom - infoPtr->calcSize.cy - yedge;
994  break;
995  }
996  }
997  else {
998  x = rcSelf.left;
999  /* As on Windows if the CCS_NODIVIDER is not present the control will move
1000  * 2 pixel down after every layout */
1001  y = rcSelf.top + ((infoPtr->dwStyle & CCS_NODIVIDER) ? 0 : REBAR_DIVIDER);
1002  width = rcSelf.right - rcSelf.left;
1003  }
1004 
1005  TRACE("hwnd %p, style=%08x, setting at (%d,%d) for (%d,%d)\n",
1006  infoPtr->hwndSelf, infoPtr->dwStyle, x, y, width, height);
1007 
1008  /* Set flag to ignore next WM_SIZE message and resize the window */
1009  infoPtr->fStatus |= SELF_RESIZE;
1010  if ((infoPtr->dwStyle & CCS_VERT) == 0)
1011  SetWindowPos(infoPtr->hwndSelf, 0, x, y, width, height, SWP_NOZORDER);
1012  else
1013  SetWindowPos(infoPtr->hwndSelf, 0, y, x, height, width, SWP_NOZORDER);
1014  infoPtr->fStatus &= ~SELF_RESIZE;
1015 }
GLint GLint GLsizei width
Definition: gl.h:1546
#define SELF_RESIZE
Definition: rebar.c:193
DWORD dwStyle
Definition: rebar.c:170
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
LONG top
Definition: windef.h:292
HWND hwndSelf
Definition: rebar.c:164
#define SM_CXEDGE
Definition: winuser.h:998
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define CCS_LAYOUT_MASK
Definition: rebar.c:140
LONG left
Definition: windef.h:291
#define SWP_NOZORDER
Definition: winuser.h:1232
SIZE calcSize
Definition: rebar.c:172
LONG right
Definition: windef.h:293
int32_t INT
Definition: typedefs.h:56
#define CCS_VERT
Definition: commctrl.h:2221
#define CCS_NODIVIDER
Definition: commctrl.h:2220
LONG cx
Definition: windef.h:319
#define CCS_TOP
Definition: commctrl.h:2214
#define SM_CYEDGE
Definition: winuser.h:999
#define CCS_NOPARENTALIGN
Definition: commctrl.h:2218
#define CCS_BOTTOM
Definition: commctrl.h:2216
#define TRACE(s)
Definition: solgame.cpp:4
int WINAPI GetSystemMetrics(_In_ int)
#define CCS_NORESIZE
Definition: commctrl.h:2217
static void translate_rect(const REBAR_INFO *infoPtr, RECT *dest, const RECT *src)
Definition: rebar.c:434
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HWND WINAPI GetParent(_In_ HWND)
#define WS_BORDER
Definition: pedump.c:625
#define HWND_DESKTOP
Definition: winuser.h:1195
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
#define CCS_NOMOVEY
Definition: commctrl.h:2215
#define REBAR_DIVIDER
Definition: rebar.c:235
LONG bottom
Definition: windef.h:294
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
LONG cy
Definition: windef.h:320
UINT fStatus
Definition: rebar.c:175

Referenced by REBAR_Layout(), and REBAR_SetRedraw().

◆ REBAR_GetBand()

static REBAR_BAND* REBAR_GetBand ( const REBAR_INFO infoPtr,
INT  i 
)
inlinestatic

Definition at line 262 of file rebar.c.

263 {
264  assert(i >= 0 && i < infoPtr->uNumBands);
265  return DPA_GetPtr(infoPtr->bands, i);
266 }
#define assert(x)
Definition: debug.h:53
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define DPA_GetPtr
Definition: commctrl.h:5
HDPA bands
Definition: rebar.c:188

Referenced by get_row_begin_for_band(), get_row_end_for_band(), next_visible(), prev_visible(), REBAR_CalcHorzBand(), REBAR_CalcVertBand(), REBAR_DeleteBand(), REBAR_Destroy(), REBAR_DumpBand(), REBAR_EraseBkGnd(), REBAR_FindBandToGrow(), REBAR_GetBandBorders(), REBAR_GetBandInfoT(), REBAR_GetRect(), REBAR_GetRowHeight(), REBAR_HandleLRDrag(), REBAR_HandleUDDrag(), REBAR_IdToIndex(), REBAR_InsertBandT(), REBAR_InternalHitTest(), REBAR_Layout(), REBAR_LayoutRow(), REBAR_LButtonDown(), REBAR_MaximizeBand(), REBAR_MinimizeBand(), REBAR_MouseLeave(), REBAR_MouseMove(), REBAR_MoveBand(), REBAR_MoveBandToRowOffset(), REBAR_MoveChildWindows(), REBAR_Notify_NMREBAR(), REBAR_PushChevron(), REBAR_Refresh(), REBAR_SetBandInfoT(), REBAR_SetBandsHeight(), REBAR_SetBarInfo(), REBAR_SetFont(), REBAR_SetRowRectsX(), REBAR_ShowBand(), REBAR_ShrinkBandsLTR(), REBAR_ShrinkBandsRTL(), REBAR_SizeChildrenToHeight(), REBAR_SizeToHeight(), and REBAR_ValidateBand().

◆ REBAR_GetBandBorders()

static LRESULT REBAR_GetBandBorders ( const REBAR_INFO infoPtr,
UINT  uBand,
RECT lpRect 
)
static

Definition at line 2222 of file rebar.c.

2223 {
2224  REBAR_BAND *lpBand;
2225 
2226  if (!lpRect)
2227  return 0;
2228  if (uBand >= infoPtr->uNumBands)
2229  return 0;
2230 
2231  lpBand = REBAR_GetBand(infoPtr, uBand);
2232 
2233  /* FIXME - the following values were determined by experimentation */
2234  /* with the REBAR Control Spy. I have guesses as to what the 4 and */
2235  /* 1 are, but I am not sure. There doesn't seem to be any actual */
2236  /* difference in size of the control area with and without the */
2237  /* style. - GA */
2238  if (infoPtr->dwStyle & RBS_BANDBORDERS) {
2239  if (infoPtr->dwStyle & CCS_VERT) {
2240  lpRect->left = 1;
2241  lpRect->top = lpBand->cxHeader + 4;
2242  lpRect->right = 1;
2243  lpRect->bottom = 0;
2244  }
2245  else {
2246  lpRect->left = lpBand->cxHeader + 4;
2247  lpRect->top = 1;
2248  lpRect->right = 0;
2249  lpRect->bottom = 1;
2250  }
2251  }
2252  else {
2253  lpRect->left = lpBand->cxHeader;
2254  }
2255  return 0;
2256 }
DWORD dwStyle
Definition: rebar.c:170
UINT uNumBands
Definition: rebar.c:162
LONG top
Definition: windef.h:292
LONG left
Definition: windef.h:291
LONG right
Definition: windef.h:293
#define CCS_VERT
Definition: commctrl.h:2221
#define RBS_BANDBORDERS
Definition: commctrl.h:1444
static REBAR_BAND * REBAR_GetBand(const REBAR_INFO *infoPtr, INT i)
Definition: rebar.c:262
LONG bottom
Definition: windef.h:294
UINT cxHeader
Definition: rebar.c:116

Referenced by REBAR_WindowProc().

◆ REBAR_GetBandCount()

static LRESULT REBAR_GetBandCount ( const REBAR_INFO infoPtr)
inlinestatic

Definition at line 2260 of file rebar.c.

2261 {
2262  TRACE("band count %u!\n", infoPtr->uNumBands);
2263 
2264  return infoPtr->uNumBands;
2265 }
UINT uNumBands
Definition: rebar.c:162
#define TRACE(s)
Definition: solgame.cpp:4

Referenced by REBAR_WindowProc().

◆ REBAR_GetBandInfoT()

static LRESULT REBAR_GetBandInfoT ( const REBAR_INFO infoPtr,
UINT  uIndex,
LPREBARBANDINFOW  lprbbi,
BOOL  bUnicode 
)
static

Definition at line 2269 of file rebar.c.

2270 {
2271  REBAR_BAND *lpBand;
2272 
2273  if (!lprbbi || lprbbi->cbSize < REBARBANDINFOA_V3_SIZE)
2274  return FALSE;
2275 
2276  if (uIndex >= infoPtr->uNumBands)
2277  return FALSE;
2278 
2279  TRACE("index %u (bUnicode=%d)\n", uIndex, bUnicode);
2280 
2281  /* copy band information */
2282  lpBand = REBAR_GetBand(infoPtr, uIndex);
2283 
2284  if (lprbbi->fMask & RBBIM_STYLE)
2285  lprbbi->fStyle = lpBand->fStyle;
2286 
2287  if (lprbbi->fMask & RBBIM_COLORS) {
2288  lprbbi->clrFore = lpBand->clrFore;
2289  lprbbi->clrBack = lpBand->clrBack;
2290  if (lprbbi->clrBack == CLR_DEFAULT)
2291  lprbbi->clrBack = infoPtr->clrBtnFace;
2292  }
2293 
2294  if (lprbbi->fMask & RBBIM_TEXT) {
2295  if (bUnicode)
2296  Str_GetPtrW(lpBand->lpText, lprbbi->lpText, lprbbi->cch);
2297  else
2298  Str_GetPtrWtoA(lpBand->lpText, (LPSTR)lprbbi->lpText, lprbbi->cch);
2299  }
2300 
2301  if (lprbbi->fMask & RBBIM_IMAGE)
2302  lprbbi->iImage = lpBand->iImage;
2303 
2304  if (lprbbi->fMask & RBBIM_CHILD)
2305  lprbbi->hwndChild = lpBand->hwndChild;
2306 
2307  if (lprbbi->fMask & RBBIM_CHILDSIZE) {
2308  lprbbi->cxMinChild = lpBand->cxMinChild;
2309  lprbbi->cyMinChild = lpBand->cyMinChild;
2310  /* to make tests pass we follow Windows' behaviour and allow reading these fields only
2311  * for RBBS_VARIABLEHEIGHTS bands */
2312  if (lprbbi->cbSize >= REBARBANDINFOW_V6_SIZE && (lpBand->fStyle & RBBS_VARIABLEHEIGHT)) {
2313  lprbbi->cyChild = lpBand->cyChild;
2314  lprbbi->cyMaxChild = lpBand->cyMaxChild;
2315  lprbbi->cyIntegral = lpBand->cyIntegral;
2316  }
2317  }
2318 
2319  if (lprbbi->fMask & RBBIM_SIZE)
2320  lprbbi->cx = lpBand->cx;
2321 
2322  if (lprbbi->fMask & RBBIM_BACKGROUND)
2323  lprbbi->hbmBack = lpBand->hbmBack;
2324 
2325  if (lprbbi->fMask & RBBIM_ID)
2326  lprbbi->wID = lpBand->wID;
2327 
2328  /* check for additional data */
2329  if (lprbbi->cbSize >= REBARBANDINFOW_V6_SIZE) {
2330  if (lprbbi->fMask & RBBIM_IDEALSIZE)
2331  lprbbi->cxIdeal = lpBand->cxIdeal;
2332 
2333  if (lprbbi->fMask & RBBIM_LPARAM)
2334  lprbbi->lParam = lpBand->lParam;
2335 
2336  if (lprbbi->fMask & RBBIM_HEADERSIZE)
2337  lprbbi->cxHeader = lpBand->cxHeader;
2338  }
2339 
2340  REBAR_DumpBandInfo(lprbbi);
2341 
2342  return TRUE;
2343 }
UINT cyMinChild
Definition: rebar.c:107
#define TRUE
Definition: types.h:120
#define RBBIM_CHILD
Definition: commctrl.h:1478
UINT uNumBands
Definition: rebar.c:162
LPWSTR lpText
Definition: rebar.c:135
UINT cyChild
Definition: rebar.c:111
#define RBBIM_HEADERSIZE
Definition: commctrl.h:1485
UINT cx
Definition: rebar.c:108
HWND hwndChild
Definition: rebar.c:105
#define RBBIM_ID
Definition: commctrl.h:1482
COLORREF clrBtnFace
Definition: rebar.c:160
char * LPSTR
Definition: xmlstorage.h:182
#define RBBIM_LPARAM
Definition: commctrl.h:1484
COLORREF clrFore
Definition: rebar.c:102
#define RBBIM_IMAGE
Definition: commctrl.h:1477
COLORREF clrBack
Definition: rebar.c:103
LPARAM lParam
Definition: rebar.c:115
#define REBARBANDINFOW_V6_SIZE
Definition: commctrl.h:1514
UINT cxMinChild
Definition: rebar.c:106
INT Str_GetPtrWtoA(LPCWSTR lpSrc, LPSTR lpDest, INT nMaxLen) DECLSPEC_HIDDEN
#define RBBIM_STYLE
Definition: commctrl.h:1474
#define RBBIM_SIZE
Definition: commctrl.h:1480
INT iImage
Definition: rebar.c:104
COLORREF clrBack
Definition: commctrl.h:1521
COLORREF clrFore
Definition: commctrl.h:1520
UINT fStyle
Definition: rebar.c:100
UINT cyIntegral
Definition: rebar.c:113
#define RBBS_VARIABLEHEIGHT
Definition: commctrl.h:1467
HBITMAP hbmBack
Definition: rebar.c:109
UINT cxIdeal
Definition: rebar.c:114
#define RBBIM_COLORS
Definition: commctrl.h:1475
#define TRACE(s)
Definition: solgame.cpp:4
#define RBBIM_TEXT
Definition: commctrl.h:1476
#define REBARBANDINFOA_V3_SIZE
Definition: commctrl.h:1511
#define RBBIM_CHILDSIZE
Definition: commctrl.h:1479
UINT wID
Definition: rebar.c:110
INT WINAPI Str_GetPtrW(LPCWSTR, LPWSTR, INT)
Definition: string.c:204
static REBAR_BAND * REBAR_GetBand(const REBAR_INFO *infoPtr, INT i)
Definition: rebar.c:262
#define CLR_DEFAULT
Definition: commctrl.h:305
static VOID REBAR_DumpBandInfo(const REBARBANDINFOW *pB)
Definition: rebar.c:340
UINT cxHeader
Definition: rebar.c:116
#define RBBIM_IDEALSIZE
Definition: commctrl.h:1483
UINT cyMaxChild
Definition: rebar.c:112
#define RBBIM_BACKGROUND
Definition: commctrl.h:1481

Referenced by REBAR_WindowProc().

◆ REBAR_GetBarHeight()

static LRESULT REBAR_GetBarHeight ( const REBAR_INFO infoPtr)
static

Definition at line 2347 of file rebar.c.

2348 {
2349  INT nHeight;
2350 
2351  nHeight = infoPtr->calcSize.cy;
2352 
2353  TRACE("height = %d\n", nHeight);
2354 
2355  return nHeight;
2356 }
SIZE calcSize
Definition: rebar.c:172
int32_t INT
Definition: typedefs.h:56
#define TRACE(s)
Definition: solgame.cpp:4
LONG cy
Definition: windef.h:320

Referenced by REBAR_WindowProc().

◆ REBAR_GetBarInfo()

static LRESULT REBAR_GetBarInfo ( const REBAR_INFO infoPtr,
LPREBARINFO  lpInfo 
)
static

Definition at line 2360 of file rebar.c.

2361 {
2362  if (!lpInfo || lpInfo->cbSize < sizeof (REBARINFO))
2363  return FALSE;
2364 
2365  TRACE("getting bar info!\n");
2366 
2367  if (infoPtr->himl) {
2368  lpInfo->himl = infoPtr->himl;
2369  lpInfo->fMask |= RBIM_IMAGELIST;
2370  }
2371 
2372  return TRUE;
2373 }
#define TRUE
Definition: types.h:120
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
#define RBIM_IMAGELIST
Definition: commctrl.h:1440
HIMAGELIST himl
Definition: rebar.c:161
#define TRACE(s)
Definition: solgame.cpp:4
HIMAGELIST himl
Definition: commctrl.h:1455

Referenced by REBAR_WindowProc().

◆ REBAR_GetBkColor()

static LRESULT REBAR_GetBkColor ( const REBAR_INFO infoPtr)
inlinestatic

Definition at line 2377 of file rebar.c.

2378 {
2379  COLORREF clr = infoPtr->clrBk;
2380 
2381  if (clr == CLR_DEFAULT)
2382  clr = infoPtr->clrBtnFace;
2383 
2384  TRACE("background color 0x%06x!\n", clr);
2385 
2386  return clr;
2387 }
COLORREF clrBk
Definition: rebar.c:157
COLORREF clrBtnFace
Definition: rebar.c:160
#define TRACE(s)
Definition: solgame.cpp:4
DWORD COLORREF
Definition: windef.h:285
#define CLR_DEFAULT
Definition: commctrl.h:305

Referenced by REBAR_WindowProc().

◆ REBAR_GetFont()

static LRESULT REBAR_GetFont ( const REBAR_INFO infoPtr)
static

Definition at line 3016 of file rebar.c.

3017 {
3018  return (LRESULT)infoPtr->hFont;
3019 }
HFONT hFont
Definition: rebar.c:168
LONG_PTR LRESULT
Definition: windef.h:209

Referenced by REBAR_WindowProc().

◆ REBAR_GetNotifyParent()

static HWND REBAR_GetNotifyParent ( const REBAR_INFO infoPtr)
static

Definition at line 502 of file rebar.c.

503 {
504  HWND parent, owner;
505 
506  parent = infoPtr->hwndNotify;
507  if (!parent) {
508  parent = GetParent (infoPtr->hwndSelf);
509  owner = GetWindow (infoPtr->hwndSelf, GW_OWNER);
510  if (owner) parent = owner;
511  }
512  return parent;
513 }
HWND hwndSelf
Definition: rebar.c:164
r parent
Definition: btrfs.c:2708
HWND WINAPI GetWindow(_In_ HWND, _In_ UINT)
HWND WINAPI GetParent(_In_ HWND)
#define GW_OWNER
Definition: winuser.h:761
HWND hwndNotify
Definition: rebar.c:166

Referenced by REBAR_Notify(), REBAR_NotifyFormat(), and REBAR_WindowProc().

◆ REBAR_GetPalette()

static LRESULT REBAR_GetPalette ( const REBAR_INFO infoPtr)
static

Definition at line 2395 of file rebar.c.

2396 {
2397  FIXME("empty stub!\n");
2398 
2399  return 0;
2400 }
#define FIXME(fmt,...)
Definition: debug.h:110

Referenced by REBAR_WindowProc().

◆ REBAR_GetRect()

static LRESULT REBAR_GetRect ( const REBAR_INFO infoPtr,
INT  iBand,
RECT lprc 
)
static

Definition at line 2404 of file rebar.c.

2405 {
2406  REBAR_BAND *lpBand;
2407 
2408  if (iBand < 0 || iBand >= infoPtr->uNumBands)
2409  return FALSE;
2410  if (!lprc)
2411  return FALSE;
2412 
2413  lpBand = REBAR_GetBand(infoPtr, iBand);
2414  /* For CCS_VERT the coordinates will be swapped - like on Windows */
2415  *lprc = lpBand->rcBand;
2416 
2417  TRACE("band %d, (%s)\n", iBand, wine_dbgstr_rect(lprc));
2418 
2419  return TRUE;
2420 }
#define TRUE
Definition: types.h:120
_In_ int _Inout_ LPRECT lprc
Definition: winuser.h:4334
UINT uNumBands
Definition: rebar.c:162
#define TRACE(s)
Definition: solgame.cpp:4
const char * wine_dbgstr_rect(const RECT *rect)
static REBAR_BAND * REBAR_GetBand(const REBAR_INFO *infoPtr, INT i)
Definition: rebar.c:262
RECT rcBand
Definition: rebar.c:128

Referenced by REBAR_WindowProc().

◆ REBAR_GetRowCount()

static LRESULT REBAR_GetRowCount ( const REBAR_INFO infoPtr)
inlinestatic

Definition at line 2424 of file rebar.c.

2425 {
2426  TRACE("%u\n", infoPtr->uNumRows);
2427 
2428  return infoPtr->uNumRows;
2429 }
UINT uNumRows
Definition: rebar.c:163
#define TRACE(s)
Definition: solgame.cpp:4

Referenced by REBAR_WindowProc().

◆ REBAR_GetRowHeight()

static LRESULT REBAR_GetRowHeight ( const REBAR_INFO infoPtr,
INT  iRow 
)
static

Definition at line 2433 of file rebar.c.

2434 {
2435  int j = 0, ret = 0;
2436  UINT i;
2437  REBAR_BAND *lpBand;
2438 
2439  for (i=0; i<infoPtr->uNumBands; i++) {
2440  lpBand = REBAR_GetBand(infoPtr, i);
2441  if (HIDDENBAND(lpBand)) continue;
2442  if (lpBand->iRow != iRow) continue;
2443  j = lpBand->rcBand.bottom - lpBand->rcBand.top;
2444  if (j > ret) ret = j;
2445  }
2446 
2447  TRACE("row %d, height %d\n", iRow, ret);
2448 
2449  return ret;
2450 }
UINT uNumBands
Definition: rebar.c:162
LONG top
Definition: windef.h:292
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
INT iRow
Definition: rebar.c:124
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
#define TRACE(s)
Definition: solgame.cpp:4
int ret
static REBAR_BAND * REBAR_GetBand(const REBAR_INFO *infoPtr, INT i)
Definition: rebar.c:262
unsigned int UINT
Definition: ndis.h:50
LONG bottom
Definition: windef.h:294
RECT rcBand
Definition: rebar.c:128
#define HIDDENBAND(a)
Definition: rebar.c:252

Referenced by REBAR_WindowProc().

◆ REBAR_GetTextColor()

static LRESULT REBAR_GetTextColor ( const REBAR_INFO infoPtr)
inlinestatic

Definition at line 2454 of file rebar.c.

2455 {
2456  TRACE("text color 0x%06x!\n", infoPtr->clrText);
2457 
2458  return infoPtr->clrText;
2459 }
COLORREF clrText
Definition: rebar.c:158
#define TRACE(s)
Definition: solgame.cpp:4

Referenced by REBAR_WindowProc().

◆ REBAR_GetToolTips()

static LRESULT REBAR_GetToolTips ( const REBAR_INFO infoPtr)
inlinestatic

Definition at line 2463 of file rebar.c.

2464 {
2465  return (LRESULT)infoPtr->hwndToolTip;
2466 }
HWND hwndToolTip
Definition: rebar.c:165
LONG_PTR LRESULT
Definition: windef.h:209

Referenced by REBAR_WindowProc().

◆ REBAR_GetUnicodeFormat()

static LRESULT REBAR_GetUnicodeFormat ( const REBAR_INFO infoPtr)
inlinestatic

Definition at line 2470 of file rebar.c.

2471 {
2472  TRACE("%s hwnd=%p\n",
2473  infoPtr->bUnicode ? "TRUE" : "FALSE", infoPtr->hwndSelf);
2474 
2475  return infoPtr->bUnicode;
2476 }
BOOL bUnicode
Definition: rebar.c:173
HWND hwndSelf
Definition: rebar.c:164
#define TRACE(s)
Definition: solgame.cpp:4

Referenced by REBAR_WindowProc().

◆ REBAR_GetVersion()

static LRESULT REBAR_GetVersion ( const REBAR_INFO infoPtr)
inlinestatic

Definition at line 2480 of file rebar.c.

2481 {
2482  TRACE("version %d\n", infoPtr->iVersion);
2483  return infoPtr->iVersion;
2484 }
INT iVersion
Definition: rebar.c:180
#define TRACE(s)
Definition: solgame.cpp:4

Referenced by REBAR_WindowProc().

◆ REBAR_HandleLRDrag()

static void REBAR_HandleLRDrag ( REBAR_INFO infoPtr,
const POINT ptsmove 
)
static

Definition at line 2043 of file rebar.c.

2048 {
2049  REBAR_BAND *hitBand;
2050  INT iHitBand, iRowBegin, iRowEnd;
2051  INT movement, xBand, cxLeft = 0;
2052  BOOL shrunkBands = FALSE;
2053 
2054  iHitBand = infoPtr->iGrabbedBand;
2055  iRowBegin = get_row_begin_for_band(infoPtr, iHitBand);
2056  iRowEnd = get_row_end_for_band(infoPtr, iHitBand);
2057  hitBand = REBAR_GetBand(infoPtr, iHitBand);
2058 
2059  xBand = hitBand->rcBand.left;
2060  movement = (infoPtr->dwStyle&CCS_VERT ? ptsmove->y : ptsmove->x)
2061  - (xBand + REBAR_PRE_GRIPPER - infoPtr->ihitoffset);
2062 
2063  /* Dragging the first band in a row cannot cause shrinking */
2064  if(iHitBand != iRowBegin)
2065  {
2066  if (movement < 0) {
2067  cxLeft = REBAR_ShrinkBandsRTL(infoPtr, iRowBegin, iHitBand, -movement, TRUE);
2068 
2069  if(cxLeft < -movement)
2070  {
2071  hitBand->cxEffective += -movement - cxLeft;
2072  hitBand->cx = hitBand->cxEffective;
2073  shrunkBands = TRUE;
2074  }
2075 
2076  } else if (movement > 0) {
2077 
2078  cxLeft = movement;
2079  if (prev_visible(infoPtr, iHitBand) >= 0)
2080  cxLeft = REBAR_ShrinkBandsLTR(infoPtr, iHitBand, iRowEnd, movement, TRUE);
2081 
2082  if(cxLeft < movement)
2083  {
2084  REBAR_BAND *lpPrev = REBAR_GetBand(infoPtr, prev_visible(infoPtr, iHitBand));
2085  lpPrev->cxEffective += movement - cxLeft;
2086  lpPrev->cx = hitBand->cxEffective;
2087  shrunkBands = TRUE;
2088  }
2089 
2090  }
2091  }
2092 
2093  if(!shrunkBands)
2094  {
2095  /* It was not possible to move the band by shrinking bands.
2096  * Try relocating the band instead. */
2097  REBAR_MoveBandToRowOffset(infoPtr, iHitBand, iRowBegin,
2098  iRowEnd, xBand + movement, TRUE);
2099  }
2100 
2101  REBAR_SetRowRectsX(infoPtr, iRowBegin, iRowEnd);
2102  if (infoPtr->dwStyle & CCS_VERT)
2103  REBAR_CalcVertBand(infoPtr, 0, infoPtr->uNumBands);
2104  else
2105  REBAR_CalcHorzBand(infoPtr, 0, infoPtr->uNumBands);
2106  REBAR_MoveChildWindows(infoPtr, iRowBegin, iRowEnd);
2107 }
#define TRUE
Definition: types.h:120
DWORD dwStyle
Definition: rebar.c:170
long y
Definition: polytest.cpp:48
UINT uNumBands
Definition: rebar.c:162
long x
Definition: polytest.cpp:48
static int REBAR_ShrinkBandsRTL(const REBAR_INFO *infoPtr, INT iBeginBand, INT iEndBand, INT cxShrink, BOOL bEnforce)
Definition: rebar.c:1207
INT cxEffective
Definition: rebar.c:118
UINT cx
Definition: rebar.c:108
INT iGrabbedBand
Definition: rebar.c:186
#define REBAR_PRE_GRIPPER
Definition: rebar.c:221
LONG left
Definition: windef.h:291
int32_t INT
Definition: typedefs.h:56
#define CCS_VERT
Definition: commctrl.h:2221
unsigned int BOOL
Definition: ntddk_ex.h:94
static VOID REBAR_MoveChildWindows(const REBAR_INFO *infoPtr, UINT start, UINT endplus)
Definition: rebar.c:1019
static int prev_visible(const REBAR_INFO *infoPtr, int i)
Definition: rebar.c:1123
static REBAR_BAND * REBAR_GetBand(const REBAR_INFO *infoPtr, INT i)
Definition: rebar.c:262
INT ihitoffset
Definition: rebar.c:184
static int REBAR_MoveBandToRowOffset(REBAR_INFO *infoPtr, INT iBand, INT iFirstBand, INT iLastBand, INT xOff, BOOL reorder)
Definition: rebar.c:1253
static int get_row_end_for_band(const REBAR_INFO *infoPtr, INT iBand)
Definition: rebar.c:1153
static void REBAR_SetRowRectsX(const REBAR_INFO *infoPtr, INT iBeginBand, INT iEndBand)
Definition: rebar.c:1164
static void REBAR_CalcHorzBand(const REBAR_INFO *infoPtr, UINT rstart, UINT rend)
Definition: rebar.c:718
RECT rcBand
Definition: rebar.c:128
static VOID REBAR_CalcVertBand(const REBAR_INFO *infoPtr, UINT rstart, UINT rend)
Definition: rebar.c:835
static int REBAR_ShrinkBandsLTR(const REBAR_INFO *infoPtr, INT iBeginBand, INT iEndBand, INT cxShrink, BOOL bEnforce)
Definition: rebar.c:1231
static int get_row_begin_for_band(const REBAR_INFO *infoPtr, INT iBand)
Definition: rebar.c:1139

Referenced by REBAR_MouseMove().

◆ REBAR_HandleUDDrag()

static void REBAR_HandleUDDrag ( REBAR_INFO infoPtr,
const POINT ptsmove 
)
static

Definition at line 2110 of file rebar.c.

2111 {
2112  INT yOff = (infoPtr->dwStyle & CCS_VERT) ? ptsmove->x : ptsmove->y;
2113  INT iHitBand, iRowBegin, iNextRowBegin;
2114  REBAR_BAND *hitBand, *rowBeginBand;
2115 
2116  if(infoPtr->uNumBands <= 0)
2117  ERR("There are no bands in this rebar\n");
2118 
2119  /* Up/down dragging can only occur when there is more than one
2120  * band in the rebar */
2121  if(infoPtr->uNumBands <= 1)
2122  return;
2123 
2124  iHitBand = infoPtr->iGrabbedBand;
2125  hitBand = REBAR_GetBand(infoPtr, iHitBand);
2126 
2127  /* If we're taking a band that has the RBBS_BREAK style set, this
2128  * style needs to be reapplied to the band that is going to become
2129  * the new start of the row. */
2130  if((hitBand->fStyle & RBBS_BREAK) &&
2131  (iHitBand < infoPtr->uNumBands - 1))
2132  REBAR_GetBand(infoPtr, iHitBand + 1)->fStyle |= RBBS_BREAK;
2133 
2134  if(yOff < 0)
2135  {
2136  /* Place the band above the current top row */
2137  if(iHitBand==0 && (infoPtr->uNumBands==1 || REBAR_GetBand(infoPtr, 1)->fStyle&RBBS_BREAK))
2138  return;
2139  DPA_DeletePtr(infoPtr->bands, iHitBand);
2140  hitBand->fStyle &= ~RBBS_BREAK;
2141  REBAR_GetBand(infoPtr, 0)->fStyle |= RBBS_BREAK;
2142  infoPtr->iGrabbedBand = DPA_InsertPtr(
2143  infoPtr->bands, 0, hitBand);
2144  }
2145  else if(yOff > REBAR_GetBand(infoPtr, infoPtr->uNumBands - 1)->rcBand.bottom)
2146  {
2147  /* Place the band below the current bottom row */
2148  if(iHitBand == infoPtr->uNumBands-1 && hitBand->fStyle&RBBS_BREAK)
2149  return;
2150  DPA_DeletePtr(infoPtr->bands, iHitBand);
2151  hitBand->fStyle |= RBBS_BREAK;
2152  infoPtr->iGrabbedBand = DPA_InsertPtr(
2153  infoPtr->bands, infoPtr->uNumBands - 1, hitBand);
2154  }
2155  else
2156  {
2157  /* Place the band in the prexisting row the mouse is hovering over */
2158  iRowBegin = first_visible(infoPtr);
2159  while(iRowBegin < infoPtr->uNumBands)
2160  {
2161  iNextRowBegin = get_row_end_for_band(infoPtr, iRowBegin);
2162  rowBeginBand = REBAR_GetBand(infoPtr, iRowBegin);
2163  if(rowBeginBand->rcBand.bottom > yOff)
2164  {
2166  infoPtr, iHitBand, iRowBegin, iNextRowBegin,
2167  ((infoPtr->dwStyle & CCS_VERT) ? ptsmove->y : ptsmove->x)
2168  - REBAR_PRE_GRIPPER - infoPtr->ihitoffset, FALSE);
2169  break;
2170  }
2171 
2172  iRowBegin = iNextRowBegin;
2173  }
2174  }
2175 
2176  REBAR_Layout(infoPtr);
2177 }
static int first_visible(const REBAR_INFO *infoPtr)
Definition: rebar.c:1133
DWORD dwStyle
Definition: rebar.c:170
long y
Definition: polytest.cpp:48
UINT uNumBands
Definition: rebar.c:162
long x
Definition: polytest.cpp:48
#define RBBS_BREAK
Definition: commctrl.h:1461
INT iGrabbedBand
Definition: rebar.c:186
#define REBAR_PRE_GRIPPER
Definition: rebar.c:221
int32_t INT
Definition: typedefs.h:56
#define CCS_VERT
Definition: commctrl.h:2221
UINT fStyle
Definition: rebar.c:100
static VOID REBAR_Layout(REBAR_INFO *infoPtr)
Definition: rebar.c:1382
INT WINAPI DPA_InsertPtr(HDPA hdpa, INT i, LPVOID p)
Definition: dpa.c:591
#define ERR(fmt,...)
Definition: debug.h:109
static REBAR_BAND * REBAR_GetBand(const REBAR_INFO *infoPtr, INT i)
Definition: rebar.c:262
LPVOID WINAPI DPA_DeletePtr(HDPA hdpa, INT i)
Definition: dpa.c:677
INT ihitoffset
Definition: rebar.c:184
LONG bottom
Definition: windef.h:294
static int REBAR_MoveBandToRowOffset(REBAR_INFO *infoPtr, INT iBand, INT iFirstBand, INT iLastBand, INT xOff, BOOL reorder)
Definition: rebar.c:1253
static int get_row_end_for_band(const REBAR_INFO *infoPtr, INT iBand)
Definition: rebar.c:1153
RECT rcBand
Definition: rebar.c:128
HDPA bands
Definition: rebar.c:188

Referenced by REBAR_MouseMove().

◆ REBAR_HitTest()

static LRESULT REBAR_HitTest ( const REBAR_INFO infoPtr,
LPRBHITTESTINFO  lprbht 
)
static

Definition at line 2488 of file rebar.c.

2489 {
2490  if (!lprbht)
2491  return -1;
2492 
2493  REBAR_InternalHitTest (infoPtr, &lprbht->pt, &lprbht->flags, &lprbht->iBand);
2494 
2495  return lprbht->iBand;
2496 }
static void REBAR_InternalHitTest(const REBAR_INFO *infoPtr, const POINT *lpPt, UINT *pFlags, INT *pBand)
Definition: rebar.c:1964

Referenced by REBAR_WindowProc().

◆ REBAR_IdToIndex()

static LRESULT REBAR_IdToIndex ( const REBAR_INFO infoPtr,
UINT  uId 
)
static

Definition at line 2500 of file rebar.c.

2501 {
2502  UINT i;
2503 
2504  if (infoPtr->uNumBands < 1)
2505  return -1;
2506 
2507  for (i = 0; i < infoPtr->uNumBands; i++) {
2508  if (REBAR_GetBand(infoPtr, i)->wID == uId) {
2509  TRACE("id %u is band %u found!\n", uId, i);
2510  return i;
2511  }
2512  }
2513 
2514  TRACE("id %u is not found\n", uId);
2515  return -1;
2516 }
UINT uNumBands
Definition: rebar.c:162
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define TRACE(s)
Definition: solgame.cpp:4
static REBAR_BAND * REBAR_GetBand(const REBAR_INFO *infoPtr, INT i)
Definition: rebar.c:262
unsigned int UINT
Definition: ndis.h:50

Referenced by REBAR_WindowProc().

◆ REBAR_InsertBandT()

static LRESULT REBAR_InsertBandT ( REBAR_INFO infoPtr,
INT  iIndex,
const REBARBANDINFOW lprbbi,
BOOL  bUnicode 
)
static

Definition at line 2520 of file rebar.c.

2521 {
2522  REBAR_BAND *lpBand;
2523 
2524  if (!lprbbi || lprbbi->cbSize < REBARBANDINFOA_V3_SIZE)
2525  return FALSE;
2526 
2527  /* trace the index as signed to see the -1 */
2528  TRACE("insert band at %d (bUnicode=%d)!\n", iIndex, bUnicode);
2529  REBAR_DumpBandInfo(lprbbi);
2530 
2531  if (!(lpBand = Alloc(sizeof(REBAR_BAND)))) return FALSE;
2532  if ((iIndex == -1) || (iIndex > infoPtr->uNumBands))
2533  iIndex = infoPtr->uNumBands;
2534  if (DPA_InsertPtr(infoPtr->bands, iIndex, lpBand) == -1)
2535  {
2536  Free(lpBand);
2537  return FALSE;
2538  }
2539  infoPtr->uNumBands++;
2540 
2541  TRACE("index %d!\n", iIndex);
2542 
2543  /* initialize band */
2544  memset(lpBand, 0, sizeof(*lpBand));
2545  lpBand->clrFore = infoPtr->clrText == CLR_NONE ? infoPtr->clrBtnText :
2546  infoPtr->clrText;
2547  lpBand->clrBack = infoPtr->clrBk == CLR_NONE ? infoPtr->clrBtnFace :
2548  infoPtr->clrBk;
2549  lpBand->iImage = -1;
2550 
2551  REBAR_CommonSetupBand(infoPtr->hwndSelf, lprbbi, lpBand);
2552 
2553  /* Make sure the defaults for these are correct */
2554  if (lprbbi->cbSize < REBARBANDINFOA_V6_SIZE || !(lpBand->fStyle & RBBS_VARIABLEHEIGHT)) {
2555  lpBand->cyChild = lpBand->cyMinChild;
2556  lpBand->cyMaxChild = 0x7fffffff;
2557  lpBand->cyIntegral = 0;
2558  }
2559 
2560  if ((lprbbi->fMask & RBBIM_TEXT) && (lprbbi->lpText)) {
2561  if (bUnicode)
2562  Str_SetPtrW(&lpBand->lpText, lprbbi->lpText);
2563  else
2564  Str_SetPtrAtoW(&lpBand->lpText, (LPSTR)lprbbi->lpText);
2565  }
2566 
2567  REBAR_ValidateBand (infoPtr, lpBand);
2568  /* On insert of second band, revalidate band 1 to possible add gripper */
2569  if (infoPtr->uNumBands == 2)
2570  REBAR_ValidateBand (infoPtr, REBAR_GetBand(infoPtr, 0));
2571 
2572  REBAR_DumpBand (infoPtr);
2573 
2574  REBAR_Layout(infoPtr);
2575  InvalidateRect(infoPtr->hwndSelf, NULL, TRUE);
2576 
2577  return TRUE;
2578 }
static VOID REBAR_ValidateBand(const REBAR_INFO *infoPtr, REBAR_BAND *lpBand)
Definition: rebar.c:1593
UINT cyMinChild
Definition: rebar.c:107
#define TRUE
Definition: types.h:120
UINT uNumBands
Definition: rebar.c:162
LPWSTR lpText
Definition: rebar.c:135
COLORREF clrBk
Definition: rebar.c:157
UINT cyChild
Definition: rebar.c:111
HWND hwndSelf
Definition: rebar.c:164
BOOL WINAPI Str_SetPtrW(LPWSTR *lppDest, LPCWSTR lpSrc)
Definition: string.c:236
COLORREF clrBtnFace
Definition: rebar.c:160
char * LPSTR
Definition: xmlstorage.h:182
static UINT REBAR_CommonSetupBand(HWND hwnd, const REBARBANDINFOW *lprbbi, REBAR_BAND *lpBand)
Definition: rebar.c:1707
COLORREF clrFore
Definition: rebar.c:102
COLORREF clrBack
Definition: rebar.c:103
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
Definition: exfuncs.h:656
COLORREF clrText
Definition: rebar.c:158
INT iImage
Definition: rebar.c:104
UINT fStyle
Definition: rebar.c:100
COLORREF clrBtnText
Definition: rebar.c:159
UINT cyIntegral
Definition: rebar.c:113
smooth NULL
Definition: ftsmooth.c:416
#define CLR_NONE
Definition: commctrl.h:304
#define RBBS_VARIABLEHEIGHT
Definition: commctrl.h:1467
#define TRACE(s)
Definition: solgame.cpp:4
static VOID REBAR_DumpBand(const REBAR_INFO *iP)
Definition: rebar.c:373
#define RBBIM_TEXT
Definition: commctrl.h:1476
#define REBARBANDINFOA_V3_SIZE
Definition: commctrl.h:1511
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
PVOID Alloc(IN DWORD dwFlags, IN SIZE_T dwBytes)
Definition: main.c:63
static VOID REBAR_Layout(REBAR_INFO *infoPtr)
Definition: rebar.c:1382
INT WINAPI DPA_InsertPtr(HDPA hdpa, INT i, LPVOID p)
Definition: dpa.c:591
static REBAR_BAND * REBAR_GetBand(const REBAR_INFO *infoPtr, INT i)
Definition: rebar.c:262
BOOL Str_SetPtrAtoW(LPWSTR *lppDest, LPCSTR lpSrc) DECLSPEC_HIDDEN
#define REBARBANDINFOA_V6_SIZE
Definition: commctrl.h:1513
static VOID REBAR_DumpBandInfo(const REBARBANDINFOW *pB)
Definition: rebar.c:340
#define memset(x, y, z)
Definition: compat.h:39
HDPA bands
Definition: rebar.c:188
UINT cyMaxChild
Definition: rebar.c:112

Referenced by REBAR_WindowProc().

◆ REBAR_InternalHitTest()

static void REBAR_InternalHitTest ( const REBAR_INFO infoPtr,
const POINT lpPt,
UINT pFlags,
INT pBand 
)
static

Definition at line 1964 of file rebar.c.

1965 {
1966  REBAR_BAND *lpBand;
1967  RECT rect;
1968  UINT iCount;
1969 
1970  GetClientRect (infoPtr->hwndSelf, &rect);
1971 
1972  *pFlags = RBHT_NOWHERE;
1973  if (PtInRect (&rect, *lpPt))
1974  {
1975  if (infoPtr->uNumBands == 0) {
1976  *pFlags = RBHT_NOWHERE;
1977  if (pBand)
1978  *pBand = -1;
1979  TRACE("NOWHERE\n");
1980  return;
1981  }
1982  else {
1983  /* somewhere inside */
1984  for (iCount = 0; iCount < infoPtr->uNumBands; iCount++) {
1985  RECT rcBand;
1986  lpBand = REBAR_GetBand(infoPtr, iCount);
1987  translate_rect(infoPtr, &rcBand, &lpBand->rcBand);
1988  if (HIDDENBAND(lpBand)) continue;
1989  if (PtInRect (&rcBand, *lpPt)) {
1990  if (pBand)
1991  *pBand = iCount;
1992  if (PtInRect (&lpBand->rcGripper, *lpPt)) {
1993  *pFlags = RBHT_GRABBER;
1994  TRACE("ON GRABBER %d\n", iCount);
1995  return;
1996  }
1997  else if (PtInRect (&lpBand->rcCapImage, *lpPt)) {
1998  *pFlags = RBHT_CAPTION;
1999  TRACE("ON CAPTION %d\n", iCount);
2000  return;
2001  }
2002  else if (PtInRect (&lpBand->rcCapText, *lpPt)) {
2003  *pFlags = RBHT_CAPTION;
2004  TRACE("ON CAPTION %d\n", iCount);
2005  return;
2006  }
2007  else if (PtInRect (&lpBand->rcChild, *lpPt)) {
2008  *pFlags = RBHT_CLIENT;
2009  TRACE("ON CLIENT %d\n", iCount);
2010  return;
2011  }
2012  else if (PtInRect (&lpBand->rcChevron, *lpPt)) {
2013  *pFlags = RBHT_CHEVRON;
2014  TRACE("ON CHEVRON %d\n", iCount);
2015  return;
2016  }
2017  else {
2018  *pFlags = RBHT_NOWHERE;
2019  TRACE("NOWHERE %d\n", iCount);
2020  return;
2021  }
2022  }
2023  }
2024 
2025  *pFlags = RBHT_NOWHERE;
2026  if (pBand)
2027  *pBand = -1;
2028 
2029  TRACE("NOWHERE\n");
2030  return;
2031  }
2032  }
2033  else {
2034  *pFlags = RBHT_NOWHERE;
2035  if (pBand)
2036  *pBand = -1;
2037  TRACE("NOWHERE\n");
2038  return;
2039  }
2040 }
RECT rcCapImage
Definition: rebar.c:130
RECT rcChild
Definition: rebar.c:132
#define RBHT_CLIENT
Definition: commctrl.h:1665
UINT uNumBands
Definition: rebar.c:162
#define RBHT_CAPTION
Definition: commctrl.h:1664
HWND hwndSelf
Definition: rebar.c:164
RECT rcGripper
Definition: rebar.c:129
& rect
Definition: startmenu.cpp:1413
RECT rcChevron
Definition: rebar.c:133
#define RBHT_NOWHERE
Definition: commctrl.h:1663
#define TRACE(s)
Definition: solgame.cpp:4
#define RBHT_GRABBER
Definition: commctrl.h:1666
RECT rcCapText
Definition: rebar.c:131
static void translate_rect(const REBAR_INFO *infoPtr, RECT *dest, const RECT *src)
Definition: rebar.c:434
#define RBHT_CHEVRON
Definition: commctrl.h:1667
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
static REBAR_BAND * REBAR_GetBand(const REBAR_INFO *infoPtr, INT i)
Definition: rebar.c:262
unsigned int UINT
Definition: ndis.h:50
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
RECT rcBand
Definition: rebar.c:128
#define HIDDENBAND(a)
Definition: rebar.c:252

Referenced by REBAR_HitTest(), REBAR_LButtonDown(), REBAR_MouseMove(), REBAR_NCHitTest(), and REBAR_SetCursor().

◆ REBAR_Layout()

static VOID REBAR_Layout ( REBAR_INFO infoPtr)
static

Definition at line 1382 of file rebar.c.

1383 {
1384  REBAR_BAND *lpBand;
1385  RECT rcAdj;
1386  SIZE oldSize;
1387  INT adjcx, i;
1388  INT rowstart;
1389  INT row = 0;
1390  INT xMin, yPos;
1391 
1392  if (infoPtr->dwStyle & (CCS_NORESIZE | CCS_NOPARENTALIGN) || GetParent(infoPtr->hwndSelf) == NULL)
1393  GetClientRect(infoPtr->hwndSelf, &rcAdj);
1394  else
1395  GetClientRect(GetParent(infoPtr->hwndSelf), &rcAdj);
1396  TRACE("adjustment rect is (%s)\n", wine_dbgstr_rect(&rcAdj));
1397 
1398  adjcx = get_rect_cx(infoPtr, &rcAdj);
1399 
1400  if (infoPtr->uNumBands == 0) {
1401  TRACE("No bands - setting size to (0,%d), style: %x\n", adjcx, infoPtr->dwStyle);
1402  infoPtr->calcSize.cx = adjcx;
1403  /* the calcSize.cy won't change for a 0 band rebar */
1404  infoPtr->uNumRows = 0;
1405  REBAR_ForceResize(infoPtr);
1406  return;
1407  }
1408 
1409  yPos = 0;
1410  xMin = 0;
1411  rowstart = first_visible(infoPtr);
1412  /* divide rows */
1413  for (i = rowstart; i < infoPtr->uNumBands; i = next_visible(infoPtr, i))
1414  {
1415  lpBand = REBAR_GetBand(infoPtr, i);
1416 
1417  if (i > rowstart && (lpBand->fStyle & RBBS_BREAK || xMin + lpBand->cxMinBand > adjcx)) {
1418  TRACE("%s break on band %d\n", (lpBand->fStyle & RBBS_BREAK ? "Hard" : "Soft"), i - 1);
1419  REBAR_LayoutRow(infoPtr, rowstart, i, adjcx, &row, &yPos);
1420  rowstart = i;
1421  xMin = 0;
1422  }
1423  else
1424  xMin += SEP_WIDTH;
1425 
1426  xMin += lpBand->cxMinBand;
1427  }
1428  if (rowstart < infoPtr->uNumBands)
1429  REBAR_LayoutRow(infoPtr, rowstart, infoPtr->uNumBands, adjcx, &row, &yPos);
1430 
1431  if (!(infoPtr->dwStyle & RBS_VARHEIGHT))
1432  yPos = REBAR_SetBandsHeight(infoPtr, first_visible(infoPtr), infoPtr->uNumBands, 0);
1433 
1434  infoPtr->uNumRows = row;
1435 
1436  if (infoPtr->dwStyle & CCS_VERT)
1437  REBAR_CalcVertBand(infoPtr, 0, infoPtr->uNumBands);
1438  else
1439  REBAR_CalcHorzBand(infoPtr, 0, infoPtr->uNumBands);
1440  /* now compute size of Rebar itself */
1441  oldSize = infoPtr->calcSize;
1442 
1443  infoPtr->calcSize.cx = adjcx;
1444  infoPtr->calcSize.cy = yPos;
1445  TRACE("calcsize size=(%d, %d), origheight=(%d,%d)\n",
1446  infoPtr->calcSize.cx, infoPtr->calcSize.cy,
1447  oldSize.cx, oldSize.cy);
1448 
1449  REBAR_DumpBand (infoPtr);
1450  REBAR_MoveChildWindows (infoPtr, 0, infoPtr->uNumBands);
1451  REBAR_ForceResize (infoPtr);
1452 
1453  /* note: after a RBN_HEIGHTCHANGE native sends once again all the RBN_CHILDSIZE
1454  * and does another ForceResize */
1455  if (oldSize.cy != infoPtr->calcSize.cy)
1456  {
1457  NMHDR heightchange;
1458  REBAR_Notify(&heightchange, infoPtr, RBN_HEIGHTCHANGE);
1459  REBAR_AutoSize(infoPtr, FALSE);
1460  }
1461 }
static int first_visible(const REBAR_INFO *infoPtr)
Definition: rebar.c:1133
DWORD dwStyle
Definition: rebar.c:170
#define RBS_VARHEIGHT
Definition: commctrl.h:1443
static int REBAR_SetBandsHeight(const REBAR_INFO *infoPtr, INT iBeginBand, INT iEndBand, INT yStart)
Definition: rebar.c:1304
UINT uNumBands
Definition: rebar.c:162
#define RBN_HEIGHTCHANGE
Definition: commctrl.h:1600
#define RBBS_BREAK
Definition: commctrl.h:1461
HWND hwndSelf
Definition: rebar.c:164
SIZE calcSize
Definition: rebar.c:172
int32_t INT
Definition: typedefs.h:56
#define CCS_VERT
Definition: commctrl.h:2221
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static VOID REBAR_MoveChildWindows(const REBAR_INFO *infoPtr, UINT start, UINT endplus)
Definition: rebar.c:1019
UINT fStyle
Definition: rebar.c:100
static void REBAR_AutoSize(REBAR_INFO *infoPtr, BOOL needsLayout)
Definition: rebar.c:1574
smooth NULL
Definition: ftsmooth.c:416
UINT uNumRows
Definition: rebar.c:163
static void REBAR_LayoutRow(const REBAR_INFO *infoPtr, int iBeginBand, int iEndBand, int cx, int *piRow, int *pyPos)
Definition: rebar.c:1339
LONG cx
Definition: windef.h:319
#define CCS_NOPARENTALIGN
Definition: commctrl.h:2218
static INT REBAR_Notify(NMHDR *nmhdr, const REBAR_INFO *infoPtr, UINT code)
Definition: rebar.c:517
static int next_visible(const REBAR_INFO *infoPtr, int i)
Definition: rebar.c:1112
#define TRACE(s)
Definition: solgame.cpp:4
static VOID REBAR_DumpBand(const REBAR_INFO *iP)
Definition: rebar.c:373
UINT cxMinBand
Definition: rebar.c:120
const char * wine_dbgstr_rect(const RECT *rect)
static VOID REBAR_ForceResize(REBAR_INFO *infoPtr)
Definition: rebar.c:950
#define CCS_NORESIZE
Definition: commctrl.h:2217
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
static REBAR_BAND * REBAR_GetBand(const REBAR_INFO *infoPtr, INT i)
Definition: rebar.c:262
HWND WINAPI GetParent(_In_ HWND)
static int get_rect_cx(const REBAR_INFO *infoPtr, const RECT *lpRect)
Definition: rebar.c:450
#define SEP_WIDTH
Definition: rebar.c:205
static void REBAR_CalcHorzBand(const REBAR_INFO *infoPtr, UINT rstart, UINT rend)
Definition: rebar.c:718
static VOID REBAR_CalcVertBand(const REBAR_INFO *infoPtr, UINT rstart, UINT rend)
Definition: rebar.c:835
LONG cy
Definition: windef.h:320
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78

Referenced by REBAR_AutoSize(), REBAR_DeleteBand(), REBAR_HandleUDDrag(), REBAR_InsertBandT(), REBAR_SetBandInfoT(), REBAR_SetFont(), REBAR_ShowBand(), REBAR_Size(), REBAR_SizeToHeight(), and REBAR_StyleChanged().

◆ REBAR_LayoutRow()

static void REBAR_LayoutRow ( const REBAR_INFO infoPtr,
int  iBeginBand,
int  iEndBand,
int  cx,
int piRow,
int pyPos 
)
static

Definition at line 1339 of file rebar.c.

1340 {
1341  REBAR_BAND *lpBand;
1342  int i, extra;
1343  int width = 0;
1344 
1345  TRACE("Adjusting row [%d;%d). Width: %d\n", iBeginBand, iEndBand, cx);
1346  for (i = iBeginBand; i < iEndBand; i++)
1347  REBAR_GetBand(infoPtr, i)->iRow = *piRow;
1348 
1349  /* compute the extra space */
1350  for (i = iBeginBand; i < iEndBand; i = next_visible(infoPtr, i))
1351  {
1352  lpBand = REBAR_GetBand(infoPtr, i);
1353  if (i > iBeginBand)
1354  width += SEP_WIDTH;
1355  lpBand->cxEffective = max(lpBand->cxMinBand, lpBand->cx);
1356  width += lpBand->cxEffective;
1357  }
1358 
1359  extra = cx - width;
1360  TRACE("Extra space: %d\n", extra);
1361  if (extra < 0) {
1362  int ret = REBAR_ShrinkBandsRTL(infoPtr, iBeginBand, iEndBand, -extra, FALSE);
1363  if (ret > 0 && next_visible(infoPtr, iBeginBand) != iEndBand) /* one band may be longer than expected... */
1364  ERR("Error layouting row %d - couldn't shrink for %d pixels (%d total shrink)\n", *piRow, ret, -extra);
1365  } else
1366  if (extra > 0) {
1367  lpBand = REBAR_FindBandToGrow(infoPtr, iBeginBand, iEndBand);
1368  lpBand->cxEffective += extra;
1369  }
1370 
1371  REBAR_SetRowRectsX(infoPtr, iBeginBand, iEndBand);
1372  if (infoPtr->dwStyle & RBS_VARHEIGHT)
1373  {
1374  if (*piRow > 0)
1375  *pyPos += SEP_WIDTH;
1376  *pyPos = REBAR_SetBandsHeight(infoPtr, iBeginBand, iEndBand, *pyPos);
1377  }
1378  (*piRow)++;
1379 }
GLint GLint GLsizei width
Definition: gl.h:1546
#define max(a, b)
Definition: svc.c:63
DWORD dwStyle
Definition: rebar.c:170
#define RBS_VARHEIGHT
Definition: commctrl.h:1443
static int REBAR_SetBandsHeight(const REBAR_INFO *infoPtr, INT iBeginBand, INT iEndBand, INT yStart)
Definition: rebar.c:1304
static int REBAR_ShrinkBandsRTL(const REBAR_INFO *infoPtr, INT iBeginBand, INT iEndBand, INT cxShrink, BOOL bEnforce)
Definition: rebar.c:1207
INT cxEffective
Definition: rebar.c:118
UINT cx
Definition: rebar.c:108
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
INT iRow
Definition: rebar.c:124
static int next_visible(const REBAR_INFO *infoPtr, int i)
Definition: rebar.c:1112
#define TRACE(s)
Definition: solgame.cpp:4
Definition: id3.c:18
UINT cxMinBand
Definition: rebar.c:120
int ret
static REBAR_BAND * REBAR_FindBandToGrow(const REBAR_INFO *infoPtr, INT iBeginBand, INT iEndBand)
Definition: rebar.c:1186
#define ERR(fmt,...)
Definition: debug.h:109
static REBAR_BAND * REBAR_GetBand(const REBAR_INFO *infoPtr, INT i)
Definition: rebar.c:262
#define SEP_WIDTH
Definition: rebar.c:205
_Out_opt_ int * cx
Definition: commctrl.h:570
static void REBAR_SetRowRectsX(const REBAR_INFO *infoPtr, INT iBeginBand, INT iEndBand)
Definition: rebar.c:1164

Referenced by REBAR_Layout().

◆ REBAR_LButtonDown()

static LRESULT REBAR_LButtonDown ( REBAR_INFO infoPtr,
LPARAM  lParam 
)
static

Definition at line 3054 of file rebar.c.

3055 {
3056  UINT htFlags;
3057  INT iHitBand;
3058  POINT ptMouseDown;
3059  ptMouseDown.x = (short)LOWORD(lParam);
3060  ptMouseDown.y = (short)HIWORD(lParam);
3061 
3062  REBAR_InternalHitTest(infoPtr, &ptMouseDown, &htFlags, &iHitBand);
3063 
3064  if (htFlags == RBHT_CHEVRON)
3065  {
3066  REBAR_PushChevron(infoPtr, iHitBand, 0);
3067  }
3068  else if (htFlags == RBHT_GRABBER || htFlags == RBHT_CAPTION)
3069  {
3070  REBAR_BAND *lpBand;
3071 
3072  TRACE("Starting drag\n");
3073 
3074  lpBand = REBAR_GetBand(infoPtr, iHitBand);
3075 
3076  SetCapture (infoPtr->hwndSelf);
3077  infoPtr->iGrabbedBand = iHitBand;
3078 
3079  /* save off the LOWORD and HIWORD of lParam as initial x,y */
3080  infoPtr->dragStart.x = (short)LOWORD(lParam);
3081  infoPtr->dragStart.y = (short)HIWORD(lParam);
3082  infoPtr->dragNow = infoPtr->dragStart;
3083  if (infoPtr->dwStyle & CCS_VERT)
3084  infoPtr->ihitoffset = infoPtr->dragStart.y - (lpBand->rcBand.left + REBAR_PRE_GRIPPER);
3085  else
3086  infoPtr->ihitoffset = infoPtr->dragStart.x - (lpBand->rcBand.left + REBAR_PRE_GRIPPER);
3087  }
3088  return 0;
3089 }
DWORD dwStyle
Definition: rebar.c:170
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
#define RBHT_CAPTION
Definition: commctrl.h:1664
INT iGrabbedBand
Definition: rebar.c:186
#define REBAR_PRE_GRIPPER
Definition: rebar.c:221
HWND hwndSelf
Definition: rebar.c:164
LONG left
Definition: windef.h:291
int32_t INT
Definition: typedefs.h:56
#define CCS_VERT
Definition: commctrl.h:2221
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
Definition: typeof.h:93
#define TRACE(s)
Definition: solgame.cpp:4
static LRESULT REBAR_PushChevron(const REBAR_INFO *infoPtr, UINT uBand, LPARAM lParam)
Definition: rebar.c:3022
#define RBHT_GRABBER
Definition: commctrl.h:1666
POINT dragNow
Definition: rebar.c:182
#define RBHT_CHEVRON
Definition: commctrl.h:1667
static REBAR_BAND * REBAR_GetBand(const REBAR_INFO *infoPtr, INT i)
Definition: rebar.c:262
POINT dragStart
Definition: rebar.c:181
HWND WINAPI SetCapture(_In_ HWND hWnd)
static void REBAR_InternalHitTest(const REBAR_INFO *infoPtr, const POINT *lpPt, UINT *pFlags, INT *pBand)
Definition: rebar.c:1964
unsigned int UINT
Definition: ndis.h:50
INT ihitoffset
Definition: rebar.c:184
#define HIWORD(l)
Definition: typedefs.h:246
RECT rcBand
Definition: rebar.c:128
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82

Referenced by REBAR_WindowProc().

◆ REBAR_LButtonUp()

static LRESULT REBAR_LButtonUp ( REBAR_INFO infoPtr)
static

Definition at line 3092 of file rebar.c.

3093 {
3094  if (infoPtr->iGrabbedBand >= 0)
3095  {
3096  NMHDR layout;
3097  RECT rect;
3098 
3099  infoPtr->dragStart.x = 0;
3100  infoPtr->dragStart.y = 0;
3101  infoPtr->dragNow = infoPtr->dragStart;
3102 
3103  ReleaseCapture ();
3104 
3105  if (infoPtr->fStatus & BEGIN_DRAG_ISSUED) {
3107  REBAR_Notify_NMREBAR (infoPtr, infoPtr->iGrabbedBand, RBN_ENDDRAG);
3108  infoPtr->fStatus &= ~BEGIN_DRAG_ISSUED;
3109  }
3110 
3111  infoPtr->iGrabbedBand = -1;
3112 
3113  GetClientRect(infoPtr->hwndSelf, &rect);
3114  InvalidateRect(infoPtr->hwndSelf, NULL, TRUE);
3115  }
3116 
3117  return 0;
3118 }
#define TRUE
Definition: types.h:120
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
INT iGrabbedBand
Definition: rebar.c:186
HWND hwndSelf
Definition: rebar.c:164
static INT REBAR_Notify_NMREBAR(const REBAR_INFO *infoPtr, UINT uBand, UINT code)
Definition: rebar.c:532
& rect
Definition: startmenu.cpp:1413
#define RBN_LAYOUTCHANGED
Definition: commctrl.h:1602
smooth NULL
Definition: ftsmooth.c:416
static INT REBAR_Notify(NMHDR *nmhdr, const REBAR_INFO *infoPtr, UINT code)
Definition: rebar.c:517
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define BEGIN_DRAG_ISSUED
Definition: rebar.c:192
static DWORD layout
Definition: bitmap.c:46
POINT dragNow
Definition: rebar.c:182
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
POINT dragStart
Definition: rebar.c:181
#define RBN_ENDDRAG
Definition: commctrl.h:1605
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2888
UINT fStatus
Definition: rebar.c:175

Referenced by REBAR_WindowProc().

◆ REBAR_MaximizeBand()

static LRESULT REBAR_MaximizeBand ( const REBAR_INFO infoPtr,
INT  iBand,
LPARAM  lParam 
)
static

Definition at line 2582 of file rebar.c.

2583 {
2584  REBAR_BAND *lpBand;
2585  int iRowBegin, iRowEnd;
2586  int cxDesired, extra, extraOrig;
2587  int cxIdealBand;
2588 
2589  /* Validate */
2590  if (infoPtr->uNumBands == 0 || iBand < 0 || iBand >= infoPtr->uNumBands) {
2591  /* error !!! */
2592  ERR("Illegal MaximizeBand, requested=%d, current band count=%d\n",
2593  iBand, infoPtr->uNumBands);
2594  return FALSE;
2595  }
2596 
2597  lpBand = REBAR_GetBand(infoPtr, iBand);
2598 
2599  if (lpBand->fStyle & RBBS_HIDDEN)
2600  {
2601  /* Windows is buggy and creates a hole */
2602  WARN("Ignoring maximize request on a hidden band (%d)\n", iBand);
2603  return FALSE;
2604  }
2605 
2606  cxIdealBand = lpBand->cxIdeal + lpBand->cxHeader + REBAR_POST_CHILD;
2607  if (lParam && (lpBand->cxEffective < cxIdealBand))
2608  cxDesired = cxIdealBand;
2609  else
2610  cxDesired = infoPtr->calcSize.cx;
2611 
2612  iRowBegin = get_row_begin_for_band(infoPtr, iBand);
2613  iRowEnd = get_row_end_for_band(infoPtr, iBand);
2614  extraOrig = extra = cxDesired - lpBand->cxEffective;
2615  if (extra > 0)
2616  extra = REBAR_ShrinkBandsRTL(infoPtr, iRowBegin, iBand, extra, TRUE);
2617  if (extra > 0)
2618  extra = REBAR_ShrinkBandsLTR(infoPtr, next_visible(infoPtr, iBand), iRowEnd, extra, TRUE);
2619  lpBand->cxEffective += extraOrig -