Mercurial > dwindows
comparison os2/dw.c @ 1009:f1256b32fd22
Added stub for dw_window_get_font() for OS/2 port
author | mhessling@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 14 May 2011 05:27:17 +0000 |
parents | 99907f19a703 |
children | 9af693aafa93 |
comparison
equal
deleted
inserted
replaced
1008:f046a2712b38 | 1009:f1256b32fd22 |
---|---|
1355 else if(strncmp(tmpbuf, ScrollClassName, strlen(ScrollClassName)+1)==0) | 1355 else if(strncmp(tmpbuf, ScrollClassName, strlen(ScrollClassName)+1)==0) |
1356 { | 1356 { |
1357 /* Handle special case of scrollbox */ | 1357 /* Handle special case of scrollbox */ |
1358 int cx = width + vectorx; | 1358 int cx = width + vectorx; |
1359 int cy = height + vectory; | 1359 int cy = height + vectory; |
1360 int usedx = 0, usedy = 0, usedpadx = 0, usedpady = 0, depth = 0; | 1360 int usedx = 0, usedy = 0, usedpadx = 0, usedpady = 0, depth = 0; |
1361 HWND box = (HWND)dw_window_get_data(handle, "_dw_resizebox"); | 1361 HWND box = (HWND)dw_window_get_data(handle, "_dw_resizebox"); |
1362 HWND client = WinWindowFromID(handle, FID_CLIENT); | 1362 HWND client = WinWindowFromID(handle, FID_CLIENT); |
1363 HWND vscroll = WinWindowFromID(handle, FID_VERTSCROLL); | 1363 HWND vscroll = WinWindowFromID(handle, FID_VERTSCROLL); |
1364 HWND hscroll = WinWindowFromID(handle, FID_HORZSCROLL); | 1364 HWND hscroll = WinWindowFromID(handle, FID_HORZSCROLL); |
1365 Box *thisbox = (Box *)WinQueryWindowPtr(box, QWP_USER); | 1365 Box *thisbox = (Box *)WinQueryWindowPtr(box, QWP_USER); |
1366 int origx, origy; | 1366 int origx, origy; |
1367 unsigned int hpos = (unsigned int)WinSendMsg(hscroll, SBM_QUERYPOS, 0, 0); | 1367 unsigned int hpos = (unsigned int)WinSendMsg(hscroll, SBM_QUERYPOS, 0, 0); |
1368 unsigned int vpos = (unsigned int)WinSendMsg(vscroll, SBM_QUERYPOS, 0, 0); | 1368 unsigned int vpos = (unsigned int)WinSendMsg(vscroll, SBM_QUERYPOS, 0, 0); |
1369 | 1369 |
1370 /* Position the scrollbox parts */ | 1370 /* Position the scrollbox parts */ |
1371 WinSetWindowPos(handle, HWND_TOP, currentx + pad, currenty + pad, cx, cy, SWP_MOVE | SWP_SIZE | SWP_ZORDER); | 1371 WinSetWindowPos(handle, HWND_TOP, currentx + pad, currenty + pad, cx, cy, SWP_MOVE | SWP_SIZE | SWP_ZORDER); |
1372 WinSetWindowPos(client, HWND_TOP, 0, _DW_DEFAULT_SCROLLBAR_WIDTH, cx - _DW_DEFAULT_SCROLLBAR_WIDTH, cy - _DW_DEFAULT_SCROLLBAR_WIDTH, SWP_MOVE | SWP_SIZE | SWP_ZORDER); | 1372 WinSetWindowPos(client, HWND_TOP, 0, _DW_DEFAULT_SCROLLBAR_WIDTH, cx - _DW_DEFAULT_SCROLLBAR_WIDTH, cy - _DW_DEFAULT_SCROLLBAR_WIDTH, SWP_MOVE | SWP_SIZE | SWP_ZORDER); |
1373 WinSetWindowPos(hscroll, HWND_TOP, 0, 0, cx - _DW_DEFAULT_SCROLLBAR_WIDTH, _DW_DEFAULT_SCROLLBAR_WIDTH, SWP_MOVE | SWP_SIZE | SWP_ZORDER); | 1373 WinSetWindowPos(hscroll, HWND_TOP, 0, 0, cx - _DW_DEFAULT_SCROLLBAR_WIDTH, _DW_DEFAULT_SCROLLBAR_WIDTH, SWP_MOVE | SWP_SIZE | SWP_ZORDER); |
1374 WinSetWindowPos(vscroll, HWND_TOP, cx - _DW_DEFAULT_SCROLLBAR_WIDTH, _DW_DEFAULT_SCROLLBAR_WIDTH, _DW_DEFAULT_SCROLLBAR_WIDTH, cy - _DW_DEFAULT_SCROLLBAR_WIDTH, SWP_MOVE | SWP_SIZE | SWP_ZORDER); | 1374 WinSetWindowPos(vscroll, HWND_TOP, cx - _DW_DEFAULT_SCROLLBAR_WIDTH, _DW_DEFAULT_SCROLLBAR_WIDTH, _DW_DEFAULT_SCROLLBAR_WIDTH, cy - _DW_DEFAULT_SCROLLBAR_WIDTH, SWP_MOVE | SWP_SIZE | SWP_ZORDER); |
1375 | 1375 |
1376 origx = cx = cx - _DW_DEFAULT_SCROLLBAR_WIDTH; | 1376 origx = cx = cx - _DW_DEFAULT_SCROLLBAR_WIDTH; |
1377 origy = cy = cy - _DW_DEFAULT_SCROLLBAR_WIDTH; | 1377 origy = cy = cy - _DW_DEFAULT_SCROLLBAR_WIDTH; |
1378 | 1378 |
1379 /* Get the required space for the box */ | 1379 /* Get the required space for the box */ |
1380 _resize_box(thisbox, &depth, cx, cy, &usedx, &usedy, 1, &usedpadx, &usedpady); | 1380 _resize_box(thisbox, &depth, cx, cy, &usedx, &usedy, 1, &usedpadx, &usedpady); |
1381 | 1381 |
1382 if(cx < usedx) | 1382 if(cx < usedx) |
1383 { | 1383 { |
1384 cx = usedx; | 1384 cx = usedx; |
1385 } | 1385 } |
1386 if(cy < usedy) | 1386 if(cy < usedy) |
1387 { | 1387 { |
1388 cy = usedy; | 1388 cy = usedy; |
1389 } | 1389 } |
1390 | 1390 |
1391 /* Setup vertical scroller */ | 1391 /* Setup vertical scroller */ |
1392 WinSendMsg(vscroll, SBM_SETSCROLLBAR, (MPARAM)vpos, MPFROM2SHORT(0, (unsigned short)usedy - origy)); | 1392 WinSendMsg(vscroll, SBM_SETSCROLLBAR, (MPARAM)vpos, MPFROM2SHORT(0, (unsigned short)usedy - origy)); |
1393 WinSendMsg(vscroll, SBM_SETTHUMBSIZE, MPFROM2SHORT((unsigned short)origy, usedy), 0); | 1393 WinSendMsg(vscroll, SBM_SETTHUMBSIZE, MPFROM2SHORT((unsigned short)origy, usedy), 0); |
1394 if(vpos > usedy) | 1394 if(vpos > usedy) |
1395 { | 1395 { |
1396 vpos = usedy; | 1396 vpos = usedy; |
1397 WinSendMsg(vscroll, SBM_SETPOS, (MPARAM)vpos, 0); | 1397 WinSendMsg(vscroll, SBM_SETPOS, (MPARAM)vpos, 0); |
1398 } | 1398 } |
1399 | 1399 |
1400 /* Setup horizontal scroller */ | 1400 /* Setup horizontal scroller */ |
1401 WinSendMsg(hscroll, SBM_SETSCROLLBAR, (MPARAM)hpos, MPFROM2SHORT(0, (unsigned short)usedx - origx)); | 1401 WinSendMsg(hscroll, SBM_SETSCROLLBAR, (MPARAM)hpos, MPFROM2SHORT(0, (unsigned short)usedx - origx)); |
1402 WinSendMsg(hscroll, SBM_SETTHUMBSIZE, MPFROM2SHORT((unsigned short)origx, usedx), 0); | 1402 WinSendMsg(hscroll, SBM_SETTHUMBSIZE, MPFROM2SHORT((unsigned short)origx, usedx), 0); |
1403 if(hpos > usedx) | 1403 if(hpos > usedx) |
1404 { | 1404 { |
1405 hpos = usedx; | 1405 hpos = usedx; |
1406 WinSendMsg(hscroll, SBM_SETPOS, (MPARAM)hpos, 0); | 1406 WinSendMsg(hscroll, SBM_SETPOS, (MPARAM)hpos, 0); |
1407 } | 1407 } |
1408 | 1408 |
1409 /* Position the scrolled box */ | 1409 /* Position the scrolled box */ |
1410 WinSetWindowPos(box, HWND_TOP, 0, -(cy - origy), cx, cy, SWP_MOVE | SWP_SIZE | SWP_ZORDER); | 1410 WinSetWindowPos(box, HWND_TOP, 0, -(cy - origy), cx, cy, SWP_MOVE | SWP_SIZE | SWP_ZORDER); |
1411 | 1411 |
1412 dw_window_set_data(handle, "_dw_cy", (void *)(cy - origy)); | 1412 dw_window_set_data(handle, "_dw_cy", (void *)(cy - origy)); |
1413 | 1413 |
1414 /* Layout the content of the scrollbox */ | 1414 /* Layout the content of the scrollbox */ |
1415 _do_resize(thisbox, cx, cy); | 1415 _do_resize(thisbox, cx, cy); |
1637 } | 1637 } |
1638 | 1638 |
1639 /* This procedure handles scrollbox */ | 1639 /* This procedure handles scrollbox */ |
1640 MRESULT EXPENTRY _scrollwndproc(HWND hWnd, ULONG msg, MPARAM mp1, MPARAM mp2) | 1640 MRESULT EXPENTRY _scrollwndproc(HWND hWnd, ULONG msg, MPARAM mp1, MPARAM mp2) |
1641 { | 1641 { |
1642 switch(msg) | 1642 switch(msg) |
1643 { | 1643 { |
1644 case WM_PAINT: | 1644 case WM_PAINT: |
1645 { | 1645 { |
1646 HPS hpsPaint; | 1646 HPS hpsPaint; |
1647 RECTL rclPaint; | 1647 RECTL rclPaint; |
1648 | 1648 |
1651 WinFillRect(hpsPaint, &rclPaint, CLR_PALEGRAY); | 1651 WinFillRect(hpsPaint, &rclPaint, CLR_PALEGRAY); |
1652 WinEndPaint(hpsPaint); | 1652 WinEndPaint(hpsPaint); |
1653 | 1653 |
1654 break; | 1654 break; |
1655 } | 1655 } |
1656 case WM_HSCROLL: | 1656 case WM_HSCROLL: |
1657 case WM_VSCROLL: | 1657 case WM_VSCROLL: |
1658 { | 1658 { |
1659 MPARAM res; | 1659 MPARAM res; |
1660 int *pos, min, max, page, which = SHORT2FROMMP(mp2); | 1660 int *pos, min, max, page, which = SHORT2FROMMP(mp2); |
1661 HWND handle, client = WinWindowFromID(hWnd, FID_CLIENT); | 1661 HWND handle, client = WinWindowFromID(hWnd, FID_CLIENT); |
1662 HWND box = (HWND)dw_window_get_data(hWnd, "_dw_resizebox"); | 1662 HWND box = (HWND)dw_window_get_data(hWnd, "_dw_resizebox"); |
1663 HWND hscroll = WinWindowFromID(hWnd, FID_HORZSCROLL); | 1663 HWND hscroll = WinWindowFromID(hWnd, FID_HORZSCROLL); |
1664 HWND vscroll = WinWindowFromID(hWnd, FID_VERTSCROLL); | 1664 HWND vscroll = WinWindowFromID(hWnd, FID_VERTSCROLL); |
1665 int hpos = dw_scrollbar_get_pos(hscroll); | 1665 int hpos = dw_scrollbar_get_pos(hscroll); |
1666 int vpos = dw_scrollbar_get_pos(vscroll); | 1666 int vpos = dw_scrollbar_get_pos(vscroll); |
1667 int cy = (int)dw_window_get_data(hWnd, "_dw_cy"); | 1667 int cy = (int)dw_window_get_data(hWnd, "_dw_cy"); |
1668 RECTL rect; | 1668 RECTL rect; |
1669 | 1669 |
1670 WinQueryWindowRect(client, &rect); | 1670 WinQueryWindowRect(client, &rect); |
1671 | 1671 |
1672 if(msg == WM_VSCROLL) | 1672 if(msg == WM_VSCROLL) |
1673 { | 1673 { |
1674 page = rect.yTop - rect.yBottom; | 1674 page = rect.yTop - rect.yBottom; |
1675 handle = vscroll; | 1675 handle = vscroll; |
1676 pos = &vpos; | 1676 pos = &vpos; |
1677 } | 1677 } |
1678 else | 1678 else |
1679 { | 1679 { |
1680 page = rect.xRight - rect.xLeft; | 1680 page = rect.xRight - rect.xLeft; |
1681 handle = hscroll; | 1681 handle = hscroll; |
1682 pos = &hpos; | 1682 pos = &hpos; |
1683 } | 1683 } |
1684 | 1684 |
1685 res = WinSendMsg(handle, SBM_QUERYRANGE, 0, 0); | 1685 res = WinSendMsg(handle, SBM_QUERYRANGE, 0, 0); |
1686 min = SHORT1FROMMP(res); | 1686 min = SHORT1FROMMP(res); |
1687 max = SHORT2FROMMP(res); | 1687 max = SHORT2FROMMP(res); |
1688 | 1688 |
1689 switch(which) | 1689 switch(which) |
1690 { | 1690 { |
1691 case SB_SLIDERTRACK: | 1691 case SB_SLIDERTRACK: |
1692 *pos = SHORT1FROMMP(mp2); | 1692 *pos = SHORT1FROMMP(mp2); |
1693 break; | 1693 break; |
1694 case SB_LINEUP: | 1694 case SB_LINEUP: |
1695 (*pos)--; | 1695 (*pos)--; |
1696 if(*pos < min) | 1696 if(*pos < min) |
1697 *pos = min; | 1697 *pos = min; |
1698 break; | 1698 break; |
1699 case SB_LINEDOWN: | 1699 case SB_LINEDOWN: |
1700 (*pos)++; | 1700 (*pos)++; |
1701 if(*pos > max) | 1701 if(*pos > max) |
1702 *pos = max; | 1702 *pos = max; |
1703 break; | 1703 break; |
1704 case SB_PAGEUP: | 1704 case SB_PAGEUP: |
1705 (*pos) -= page; | 1705 (*pos) -= page; |
1706 if(*pos < min) | 1706 if(*pos < min) |
1707 *pos = min; | 1707 *pos = min; |
1708 break; | 1708 break; |
1709 case SB_PAGEDOWN: | 1709 case SB_PAGEDOWN: |
1710 (*pos) += page; | 1710 (*pos) += page; |
1711 if(*pos > max) | 1711 if(*pos > max) |
1712 *pos = max; | 1712 *pos = max; |
1713 break; | 1713 break; |
1714 } | 1714 } |
1715 WinSendMsg(handle, SBM_SETPOS, (MPARAM)*pos, 0); | 1715 WinSendMsg(handle, SBM_SETPOS, (MPARAM)*pos, 0); |
1716 /* Position the scrolled box */ | 1716 /* Position the scrolled box */ |
1717 WinSetWindowPos(box, HWND_TOP, -hpos, -(cy - vpos), 0, 0, SWP_MOVE); | 1717 WinSetWindowPos(box, HWND_TOP, -hpos, -(cy - vpos), 0, 0, SWP_MOVE); |
1718 break; | 1718 break; |
1719 } | 1719 } |
1720 } | 1720 } |
1721 return WinDefWindowProc(hWnd, msg, mp1, mp2); | 1721 return WinDefWindowProc(hWnd, msg, mp1, mp2); |
1722 } | 1722 } |
1723 | 1723 |
1724 void _click_default(HWND handle) | 1724 void _click_default(HWND handle) |
1725 { | 1725 { |
1726 char tmpbuf[100]; | 1726 char tmpbuf[100]; |
4079 int API dw_window_set_font(HWND handle, char *fontname) | 4079 int API dw_window_set_font(HWND handle, char *fontname) |
4080 { | 4080 { |
4081 return WinSetPresParam(handle, PP_FONTNAMESIZE, strlen(fontname)+1, fontname); | 4081 return WinSetPresParam(handle, PP_FONTNAMESIZE, strlen(fontname)+1, fontname); |
4082 } | 4082 } |
4083 | 4083 |
4084 /* | |
4085 * Gets the font used by a specified window (widget) handle. | |
4086 * Parameters: | |
4087 * handle: The window (widget) handle. | |
4088 * fontname: Name and size of the font in the form "size.fontname" | |
4089 */ | |
4090 char * API dw_window_get_font(HWND handle) | |
4091 { | |
4092 return "not implemented"; | |
4093 } | |
4094 | |
4084 /* Internal version */ | 4095 /* Internal version */ |
4085 int _dw_window_set_color(HWND handle, ULONG fore, ULONG back) | 4096 int _dw_window_set_color(HWND handle, ULONG fore, ULONG back) |
4086 { | 4097 { |
4087 if((fore & DW_RGB_COLOR) == DW_RGB_COLOR) | 4098 if((fore & DW_RGB_COLOR) == DW_RGB_COLOR) |
4088 { | 4099 { |
4289 * type: Either DW_VERT (vertical) or DW_HORZ (horizontal). | 4300 * type: Either DW_VERT (vertical) or DW_HORZ (horizontal). |
4290 * pad: Number of pixels to pad around the box. | 4301 * pad: Number of pixels to pad around the box. |
4291 */ | 4302 */ |
4292 HWND API dw_scrollbox_new(int type, int pad) | 4303 HWND API dw_scrollbox_new(int type, int pad) |
4293 { | 4304 { |
4294 HWND hwndframe, box = dw_box_new(type, pad); | 4305 HWND hwndframe, box = dw_box_new(type, pad); |
4295 HWND client, tmpbox = dw_box_new(DW_VERT, 0); | 4306 HWND client, tmpbox = dw_box_new(DW_VERT, 0); |
4296 WindowData *blah = calloc(sizeof(WindowData), 1); | 4307 WindowData *blah = calloc(sizeof(WindowData), 1); |
4297 dw_box_pack_start(tmpbox, box, 1, 1, TRUE, TRUE, 0); | 4308 dw_box_pack_start(tmpbox, box, 1, 1, TRUE, TRUE, 0); |
4298 hwndframe = WinCreateWindow(HWND_OBJECT, ScrollClassName, "", WS_VISIBLE | WS_CLIPCHILDREN, | 4309 hwndframe = WinCreateWindow(HWND_OBJECT, ScrollClassName, "", WS_VISIBLE | WS_CLIPCHILDREN, |
4299 0, 0, 2000, 1000, NULLHANDLE, HWND_TOP, 0, NULL, NULL); | 4310 0, 0, 2000, 1000, NULLHANDLE, HWND_TOP, 0, NULL, NULL); |
4300 WinCreateWindow(hwndframe, WC_SCROLLBAR, "", WS_VISIBLE | SBS_AUTOTRACK | SBS_VERT, | 4311 WinCreateWindow(hwndframe, WC_SCROLLBAR, "", WS_VISIBLE | SBS_AUTOTRACK | SBS_VERT, |
4301 0,0,2000,1000, hwndframe, HWND_TOP, FID_VERTSCROLL, NULL, NULL); | 4312 0,0,2000,1000, hwndframe, HWND_TOP, FID_VERTSCROLL, NULL, NULL); |
4302 WinCreateWindow(hwndframe, WC_SCROLLBAR, "", WS_VISIBLE | SBS_AUTOTRACK | SBS_HORZ, | 4313 WinCreateWindow(hwndframe, WC_SCROLLBAR, "", WS_VISIBLE | SBS_AUTOTRACK | SBS_HORZ, |
4303 0,0,2000,1000, hwndframe, HWND_TOP, FID_HORZSCROLL, NULL, NULL); | 4314 0,0,2000,1000, hwndframe, HWND_TOP, FID_HORZSCROLL, NULL, NULL); |
4304 client = WinCreateWindow(hwndframe, WC_FRAME, "", WS_VISIBLE | WS_CLIPCHILDREN, | 4315 client = WinCreateWindow(hwndframe, WC_FRAME, "", WS_VISIBLE | WS_CLIPCHILDREN, |
4305 0,0,2000,1000, NULLHANDLE, HWND_TOP, FID_CLIENT, NULL, NULL); | 4316 0,0,2000,1000, NULLHANDLE, HWND_TOP, FID_CLIENT, NULL, NULL); |
4306 WinSetWindowPtr(client, QWP_USER, calloc(sizeof(Box), 1)); | 4317 WinSetParent(tmpbox, client, FALSE); |
4307 WinSetParent(tmpbox, client, FALSE); | 4318 WinSetWindowPtr(hwndframe, QWP_USER, blah); |
4308 WinSetWindowPtr(hwndframe, QWP_USER, blah); | 4319 dw_window_set_data(hwndframe, "_dw_resizebox", (void *)tmpbox); |
4309 dw_window_set_data(hwndframe, "_dw_resizebox", (void *)tmpbox); | |
4310 dw_window_set_data(hwndframe, "_dw_box", (void *)box); | 4320 dw_window_set_data(hwndframe, "_dw_box", (void *)box); |
4311 dw_window_set_color(hwndframe, DW_CLR_PALEGRAY, DW_CLR_PALEGRAY); | 4321 dw_window_set_color(hwndframe, DW_CLR_PALEGRAY, DW_CLR_PALEGRAY); |
4312 dw_window_set_color(client, DW_CLR_PALEGRAY, DW_CLR_PALEGRAY); | 4322 dw_window_set_color(client, DW_CLR_PALEGRAY, DW_CLR_PALEGRAY); |
4313 return hwndframe; | 4323 return hwndframe; |
4314 } | 4324 } |
4315 | 4325 |
4316 /* | 4326 /* |
4317 * Returns the position of the scrollbar in the scrollbox | 4327 * Returns the position of the scrollbar in the scrollbox |
4318 * Parameters: | 4328 * Parameters: |
4319 * handle: Handle to the scrollbox to be queried. | 4329 * handle: Handle to the scrollbox to be queried. |
4320 * orient: The vertical or horizontal scrollbar. | 4330 * orient: The vertical or horizontal scrollbar. |
4321 */ | 4331 */ |
4322 int API dw_scrollbox_get_pos( HWND handle, int orient ) | 4332 int API dw_scrollbox_get_pos( HWND handle, int orient ) |
4323 { | 4333 { |
4324 HWND scroll; | 4334 HWND scroll; |
4325 | 4335 |
4326 if(orient == DW_VERT) | 4336 if(orient == DW_VERT) |
4327 { | 4337 { |
4328 scroll = WinWindowFromID(handle, FID_VERTSCROLL); | 4338 scroll = WinWindowFromID(handle, FID_VERTSCROLL); |
4329 } | 4339 } |
4330 else | 4340 else |
4331 { | 4341 { |
4332 scroll = WinWindowFromID(handle, FID_HORZSCROLL); | 4342 scroll = WinWindowFromID(handle, FID_HORZSCROLL); |
4333 } | 4343 } |
4334 return (int)WinSendMsg(scroll, SBM_QUERYPOS, 0, 0); | 4344 return (int)WinSendMsg(scroll, SBM_QUERYPOS, 0, 0); |
4335 } | 4345 } |
4336 | 4346 |
4337 /* | 4347 /* |
4338 * Gets the range for the scrollbar in the scrollbox. | 4348 * Gets the range for the scrollbar in the scrollbox. |
4339 * Parameters: | 4349 * Parameters: |
4340 * handle: Handle to the scrollbox to be queried. | 4350 * handle: Handle to the scrollbox to be queried. |
4341 * orient: The vertical or horizontal scrollbar. | 4351 * orient: The vertical or horizontal scrollbar. |
4342 */ | 4352 */ |
4343 int API dw_scrollbox_get_range( HWND handle, int orient ) | 4353 int API dw_scrollbox_get_range( HWND handle, int orient ) |
4344 { | 4354 { |
4345 HWND scroll; | 4355 HWND scroll; |
4346 | 4356 |
4347 if(orient == DW_VERT) | 4357 if(orient == DW_VERT) |
4348 { | 4358 { |
4349 scroll = WinWindowFromID(handle, FID_VERTSCROLL); | 4359 scroll = WinWindowFromID(handle, FID_VERTSCROLL); |
4350 } | 4360 } |
4351 else | 4361 else |
4352 { | 4362 { |
4353 scroll = WinWindowFromID(handle, FID_HORZSCROLL); | 4363 scroll = WinWindowFromID(handle, FID_HORZSCROLL); |
4354 } | 4364 } |
4355 return SHORT2FROMMP(WinSendMsg(scroll, SLM_QUERYSLIDERINFO, MPFROM2SHORT(SMA_SLIDERARMPOSITION,SMA_RANGEVALUE), 0)); | 4365 return SHORT2FROMMP(WinSendMsg(scroll, SLM_QUERYSLIDERINFO, MPFROM2SHORT(SMA_SLIDERARMPOSITION,SMA_RANGEVALUE), 0)); |
4356 } | 4366 } |
4357 | 4367 |
4358 /* | 4368 /* |
4359 * Create a new Group Box to be packed. | 4369 * Create a new Group Box to be packed. |
4360 * Parameters: | 4370 * Parameters: |
5901 return; | 5911 return; |
5902 } | 5912 } |
5903 | 5913 |
5904 if(WinWindowFromID(box, FID_CLIENT)) | 5914 if(WinWindowFromID(box, FID_CLIENT)) |
5905 { | 5915 { |
5906 HWND intbox = (HWND)dw_window_get_data(box, "_dw_box"); | 5916 HWND intbox = (HWND)dw_window_get_data(box, "_dw_box"); |
5907 if(intbox) | 5917 if(intbox) |
5908 { | 5918 { |
5909 box = intbox; | 5919 box = intbox; |
5910 } | 5920 } |
5911 else | 5921 else |
5912 { | 5922 { |
5913 box = WinWindowFromID(box, FID_CLIENT); | 5923 box = WinWindowFromID(box, FID_CLIENT); |
5914 hsize = vsize = TRUE; | 5924 hsize = vsize = TRUE; |
5915 } | 5925 } |
5916 } | 5926 } |
5917 _dw_box_pack_end(box, item, width, height, hsize, vsize, pad, funcname); | 5927 _dw_box_pack_end(box, item, width, height, hsize, vsize, pad, funcname); |
5918 } | 5928 } |
5919 | 5929 |
5920 void _dw_box_pack_end(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad, char *functionname) | 5930 void _dw_box_pack_end(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad, char *functionname) |
9250 return; | 9260 return; |
9251 } | 9261 } |
9252 | 9262 |
9253 if(WinWindowFromID(box, FID_CLIENT)) | 9263 if(WinWindowFromID(box, FID_CLIENT)) |
9254 { | 9264 { |
9255 HWND intbox = (HWND)dw_window_get_data(box, "_dw_box"); | 9265 HWND intbox = (HWND)dw_window_get_data(box, "_dw_box"); |
9256 if(intbox) | 9266 if(intbox) |
9257 { | 9267 { |
9258 box = intbox; | 9268 box = intbox; |
9259 } | 9269 } |
9260 else | 9270 else |
9261 { | 9271 { |
9262 box = WinWindowFromID(box, FID_CLIENT); | 9272 box = WinWindowFromID(box, FID_CLIENT); |
9263 hsize = vsize = TRUE; | 9273 hsize = vsize = TRUE; |
9264 } | 9274 } |
9265 } | 9275 } |
9266 _dw_box_pack_start(box, item, width, height, hsize, vsize, pad, funcname); | 9276 _dw_box_pack_start(box, item, width, height, hsize, vsize, pad, funcname); |
9267 } | 9277 } |
9268 | 9278 |
9269 void _dw_box_pack_start(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad, char *functionname) | 9279 void _dw_box_pack_start(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad, char *functionname) |