Ejemplo n.º 1
0
/*********************************************************************
*
*       _GetNumVisItems

  Returns:
    Number of fully or partially visible items
*/
static int _GetNumVisItems(LISTBOX_Obj* pObj) {
  int FontDist = GUI_GetYDistOfFont(pObj->pFont);
  int ysize = WM__GetWindowSizeY(&pObj->Widget.Win);
  ysize -= 2*  pObj->Widget.pEffect->EffectSize;
  if (FontDist)
    return ysize  / FontDist;
  return 1;
}
Ejemplo n.º 2
0
/*********************************************************************
*
*       WM_GetWindowSizeY

  Return height of window in pixels
*/
int WM_GetWindowSizeY(WM_HWIN hWin) {
  int r;
  WM_Obj* pWin;
  WM_LOCK();
  hWin = _GetDefaultWin(hWin);
  pWin = WM_H2P(hWin);
  r = WM__GetWindowSizeY(pWin);
  WM_UNLOCK();
  return r;
}