39 #include "wine/unicode.h" 112 margin = (
tm.tmInternalLeading ?
tm.tmInternalLeading : 2);
130 TRACE(
" textHeight=%d+%d, final height=%d\n",
tm.tmHeight,
tm.tmInternalLeading,
height);
145 TS_DRAW, &gripperSize)))
228 TRACE(
"item %d\n", itemID);
343 part = &infoPtr->
parts[
i];
346 r->bottom =
rect.bottom;
352 r->right =
rect.right;
416 TRACE(
"%d\n", nPart);
418 if ((nPart < -1) || (nPart >= infoPtr->
numParts))
433 TRACE(
"(%d)\n", num_parts);
439 for (
i = 0;
i < num_parts;
i++) {
450 TRACE(
"part %d\n", nPart);
451 if(nPart >= infoPtr->
numParts || nPart < 0)
467 TRACE(
"part %d\n", nPart);
470 if (nPart < 0 || nPart >= infoPtr->
numParts)
return 0;
473 part = &infoPtr->
part0;
475 part = &infoPtr->
parts[nPart];
496 TRACE(
"part %d\n", nPart);
497 if (nPart < 0 || nPart >= infoPtr->
numParts)
return 0;
500 part = &infoPtr->
part0;
502 part = &infoPtr->
parts[nPart];
522 TRACE(
"part %d\n", nPart);
525 if (nPart < 0 || nPart >= infoPtr->
numParts)
return 0;
528 part = &infoPtr->
part0;
530 part = &infoPtr->
parts[nPart];
591 oldBkColor = infoPtr->
clrBk;
595 TRACE(
"CREF: %08x -> %08x\n", oldBkColor, infoPtr->
clrBk);
603 if ((nPart < -1) || (nPart >= infoPtr->
numParts))
606 TRACE(
"setting part %d\n", nPart);
631 if (ysize & 1) ysize--;
651 if (oldNumParts > infoPtr->
numParts) {
652 for (
i = infoPtr->
numParts ;
i < oldNumParts;
i++) {
656 }
else if (oldNumParts < infoPtr->numParts) {
658 if (!tmp)
return FALSE;
659 for (
i = 0;
i < oldNumParts;
i++) {
663 infoPtr->
parts = tmp;
665 if (oldNumParts == infoPtr->
numParts) {
666 for (
i=0;
i < oldNumParts;
i++)
687 if (nTipCount < infoPtr->numParts) {
690 TRACE(
"add tool %d\n",
i);
696 else if (nTipCount > infoPtr->
numParts) {
698 for (
i = nTipCount - 1;
i >= infoPtr->
numParts;
i--) {
699 TRACE(
"delete tool %d\n",
i);
728 if (nPart == 0x00ff) {
729 part = &infoPtr->
part0;
731 if (infoPtr->
parts && nPart >= 0 && nPart < infoPtr->numParts) {
732 part = &infoPtr->
parts[nPart];
735 if (!part)
return FALSE;
740 oldStyle = part->
style;
754 if (!ntext)
return FALSE;
758 if (!ntext)
return FALSE;
779 if (!changed && !part->
text)
835 TRACE(
"(0x%x)\n", bUnicode);
847 TRACE(
"(simple=%d)\n", simple);
848 if (infoPtr->
simple == simple)
897 NONCLIENTMETRICSW nclm;
904 if (!infoPtr)
goto create_fail;
907 infoPtr->Self =
hwnd;
909 infoPtr->numParts = 1;
911 infoPtr->simple =
FALSE;
918 if (infoPtr->minHeight & 1) infoPtr->minHeight--;
923 nclm.cbSize =
sizeof(nclm);
930 infoPtr->part0.bound =
rect;
931 infoPtr->part0.text = 0;
932 infoPtr->part0.x = 0;
933 infoPtr->part0.style = 0;
934 infoPtr->part0.hIcon = 0;
938 if (!infoPtr->parts)
goto create_fail;
939 infoPtr->parts[0].bound =
rect;
940 infoPtr->parts[0].text = 0;
941 infoPtr->parts[0].x = -1;
942 infoPtr->parts[0].style = 0;
943 infoPtr->parts[0].hIcon = 0;
950 if (!infoPtr->parts[0].text)
goto create_fail;
962 infoPtr->hwndToolTip =
968 if (infoPtr->hwndToolTip) {
1081 part = &infoPtr->
parts[0];
1108 WARN(
"flags MUST be SIZE_RESTORED or SIZE_MAXIMIZED\n");
1119 x = parent_rect.
left;
1287 case WM_NOTIFYFORMAT:
1314 case WM_THEMECHANGED:
1319 ERR(
"unknown msg %04x wp=%04lx lp=%08lx\n",
HRESULT WINAPI GetThemePartSize(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, RECT *prc, THEMESIZE eSize, SIZE *psz)
struct tagTOOLINFOW TTTOOLINFOW
GLint GLint GLsizei width
#define WM_SYSCOLORCHANGE
static BOOL STATUSBAR_SetTextT(STATUS_INFO *infoPtr, INT nPart, WORD style, LPWSTR text, BOOL isW)
static LRESULT theme_changed(const STATUS_INFO *infoPtr)
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
static LRESULT STATUSBAR_NotifyFormat(STATUS_INFO *infoPtr, HWND from, INT cmd)
#define WideCharToMultiByte
#define TTM_UPDATETIPTEXTA
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
HDC WINAPI GetDC(_In_opt_ HWND)
static const D3D_BLOB_PART parts[]
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
GLdouble GLdouble GLdouble r
static LRESULT WINAPI StatusWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
GLuint GLuint GLsizei count
TW_UINT32 TW_UINT16 TW_UINT16 MSG
static LRESULT STATUSBAR_GetTipTextA(const STATUS_INFO *infoPtr, INT id, LPSTR tip, INT size)
static LPCSTR debugstr_t(LPCWSTR text, BOOL isW)
BOOL WINAPI UpdateWindow(_In_ HWND)
static BOOL STATUSBAR_Simple(STATUS_INFO *infoPtr, BOOL simple)
static LRESULT STATUSBAR_Relay2Tip(const STATUS_INFO *infoPtr, UINT uMsg, WPARAM wParam, LPARAM lParam)
static LRESULT STATUSBAR_GetTipTextW(const STATUS_INFO *infoPtr, INT id, LPWSTR tip, INT size)
static COLORREF STATUSBAR_SetBkColor(STATUS_INFO *infoPtr, COLORREF color)
void STATUS_Register(void)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
static BOOL STATUSBAR_GetBorders(const STATUS_INFO *infoPtr, INT out[])
static HTHEME(WINAPI *pOpenThemeDataEx)(HWND
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
static BOOL STATUSBAR_SetBorders(STATUS_INFO *infoPtr, const INT in[])
LONG WINAPI GetMessageTime(void)
GLint GLint GLint GLint GLint x
static LRESULT STATUSBAR_GetTextLength(STATUS_INFO *infoPtr, INT nPart)
BOOL WINAPI DrawFrameControl(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
DWORD WINAPI GetMessagePos(void)
#define GetWindowLongPtrW
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
static BOOL STATUSBAR_WMNCHitTest(const STATUS_INFO *infoPtr, INT x, INT y)
BOOL WINAPI DestroyWindow(_In_ HWND)
HRESULT WINAPI DrawThemeBackground(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect)
WINE_UNICODE_INLINE int isprintW(WCHAR wc)
static BOOL STATUSBAR_GetRect(const STATUS_INFO *infoPtr, INT nPart, LPRECT rect)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static INT STATUSBAR_GetParts(const STATUS_INFO *infoPtr, INT num_parts, INT parts[])
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
GLenum GLuint GLenum GLsizei const GLchar * buf
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
static LRESULT STATUSBAR_SendMouseNotify(const STATUS_INFO *infoPtr, UINT code, UINT msg, WPARAM wParam, LPARAM lParam)
static BOOL STATUSBAR_SetMinHeight(STATUS_INFO *infoPtr, INT height)
static LRESULT STATUSBAR_WMPaint(STATUS_INFO *infoPtr, HDC hdc)
LONG WINAPI SetWindowLongW(_In_ HWND, _In_ int, _In_ LONG)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI DrawEdge(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
_Out_opt_ int _Out_opt_ int * cy
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
static LRESULT STATUSBAR_SetTipTextW(const STATUS_INFO *infoPtr, INT id, LPWSTR text)
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
static LRESULT STATUSBAR_WMDestroy(STATUS_INFO *infoPtr)
void COMCTL32_GetFontMetrics(HFONT hFont, TEXTMETRICW *ptm) DECLSPEC_HIDDEN
static int STATUSBAR_InternalHitTest(const STATUS_INFO *infoPtr, const POINT *pt)
WINE_DEFAULT_DEBUG_CHANNEL(statusbar)
HRESULT WINAPI GetThemeBackgroundExtent(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pContentRect, RECT *pExtentRect)
BOOL WINAPI SystemParametersInfoW(_In_ UINT, _In_ UINT, _Inout_opt_ PVOID, _In_ UINT)
#define SB_SETUNICODEFORMAT
static UINT STATUSBAR_ComputeHeight(STATUS_INFO *infoPtr)
BOOL WINAPI DrawIconEx(_In_ HDC, _In_ int, _In_ int, _In_ HICON, _In_ int, _In_ int, _In_ UINT, _In_opt_ HBRUSH, _In_ UINT)
#define TTM_UPDATETIPTEXTW
#define DFCS_SCROLLSIZEGRIP
GLint GLint GLsizei GLsizei GLsizei GLint border
const char * wine_dbgstr_rect(const RECT *rect)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
PVOID Alloc(IN DWORD dwFlags, IN SIZE_T dwBytes)
static void STATUSBAR_SetPartBounds(STATUS_INFO *infoPtr)
int WINAPI GetSystemMetrics(_In_ int)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR classlist)
static LRESULT STATUSBAR_SetUnicodeFormat(STATUS_INFO *infoPtr, BOOL bUnicode)
HTHEME WINAPI GetWindowTheme(HWND hwnd)
static BOOL STATUSBAR_SetParts(STATUS_INFO *infoPtr, INT count, LPINT parts)
static void STATUSBAR_RefreshPart(const STATUS_INFO *infoPtr, HDC hdc, const STATUSWINDOWPART *part, int itemID)
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
static LRESULT STATUSBAR_Refresh(STATUS_INFO *infoPtr, HDC hdc)
#define memcpy(s1, s2, n)
static LRESULT STATUSBAR_GetTextW(STATUS_INFO *infoPtr, INT nPart, LPWSTR buf)
static LRESULT STATUSBAR_WMSetFont(STATUS_INFO *infoPtr, HFONT font, BOOL redraw)
static const WCHAR themeClass[]
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
void STATUS_Unregister(void)
GLint GLint GLsizei GLsizei height
static BOOL STATUSBAR_WMSetText(const STATUS_INFO *infoPtr, LPCSTR text)
void redraw(int x, int y, int cx, int cy)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
#define SB_GETTEXTLENGTHW
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
#define SB_GETTEXTLENGTHA
BOOL WINAPI RectVisible(_In_ HDC, _In_ LPCRECT)
void WINAPI DrawStatusTextW(HDC hdc, LPCRECT lprc, LPCWSTR text, UINT style)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
static INT STATUSBAR_WMGetText(const STATUS_INFO *infoPtr, INT size, LPWSTR buf)
GLint GLint GLint GLint GLint GLint y
static LRESULT STATUSBAR_GetTextA(STATUS_INFO *infoPtr, INT nPart, LPSTR buf)
#define MultiByteToWideChar
static void STATUSBAR_DrawSizeGrip(HTHEME theme, HDC hdc, LPRECT lpRect)
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
static BOOL STATUSBAR_WMSize(STATUS_INFO *infoPtr, WORD flags)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
struct tagTOOLINFOA TTTOOLINFOA
BOOL WINAPI IsWindowVisible(_In_ HWND)
BOOL COMCTL32_IsReflectedMessage(UINT uMsg) DECLSPEC_HIDDEN
static BOOL STATUSBAR_SetIcon(STATUS_INFO *infoPtr, INT nPart, HICON hIcon)
#define SetWindowLongPtrW
#define SB_GETUNICODEFORMAT
static LRESULT STATUSBAR_SetTipTextA(const STATUS_INFO *infoPtr, INT id, LPSTR text)
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)
#define NM_TOOLTIPSCREATED
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
HBRUSH WINAPI GetSysColorBrush(_In_ int)
static void STATUSBAR_DrawPart(const STATUS_INFO *infoPtr, HDC hdc, const STATUSWINDOWPART *part, int itemID)
static LRESULT STATUSBAR_WMCreate(HWND hwnd, const CREATESTRUCTA *lpCreate)
#define SBN_SIMPLEMODECHANGE
VOID COMCTL32_RefreshSysColors(void) DECLSPEC_HIDDEN
HRESULT WINAPI CloseThemeData(HTHEME hTheme)
static HICON STATUSBAR_GetIcon(const STATUS_INFO *infoPtr, INT nPart)
HRESULT WINAPI DrawThemeText(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, LPCWSTR pszText, int iCharCount, DWORD dwTextFlags, DWORD dwTextFlags2, const RECT *pRect)