示例#1
0
int32_t CFWL_GridImp::GetWidgetSpan(IFWL_Widget* pWidget, FX_BOOL bColumn) {
  CFWL_GridWidgetInfo* pInfo =
      static_cast<CFWL_GridWidgetInfo*>(GetWidgetInfo(pWidget));
  if (pInfo) {
    return bColumn ? pInfo->m_iColumnSpan : pInfo->m_iRowSpan;
  }
  return 0;
}
示例#2
0
FWL_ERR CFWL_GridImp::RemoveWidgetMargin(IFWL_Widget* pWidget,
                                         FWL_GRIDMARGIN eMargin) {
  CFWL_GridWidgetInfo* pInfo =
      static_cast<CFWL_GridWidgetInfo*>(GetWidgetInfo(pWidget));
  if (pInfo) {
    pInfo->m_dwMarginFlag &= ~(1 << eMargin);
  }
  return FWL_ERR_Succeeded;
}
示例#3
0
FWL_ERR CFWL_GridImp::SetWidgetSpan(IFWL_Widget* pWidget,
                                    int32_t iSpan,
                                    FX_BOOL bColumn) {
  CFWL_GridWidgetInfo* pInfo =
      static_cast<CFWL_GridWidgetInfo*>(GetWidgetInfo(pWidget));
  if (pInfo) {
    bColumn ? pInfo->m_iColumnSpan = iSpan : pInfo->m_iRowSpan = iSpan;
  }
  return FWL_ERR_Succeeded;
}
示例#4
0
FWL_ERR CFWL_GridImp::SetWidgetPos(IFWL_Widget* pWidget,
                                   int32_t iPos,
                                   FX_BOOL bColumn) {
  CFWL_GridWidgetInfo* pInfo =
      static_cast<CFWL_GridWidgetInfo*>(GetWidgetInfo(pWidget));
  if (pInfo) {
    bColumn ? pInfo->m_iColumn = iPos : pInfo->m_iRow = iPos;
  }
  return FWL_ERR_Succeeded;
}
示例#5
0
FWL_ERR CFWL_GridImp::SetWidgetMargin(IFWL_Widget* pWidget,
                                      FWL_GRIDMARGIN eMargin,
                                      FX_FLOAT fMargin) {
  CFWL_GridWidgetInfo* pInfo =
      static_cast<CFWL_GridWidgetInfo*>(GetWidgetInfo(pWidget));
  if (pInfo) {
    pInfo->m_Margin[eMargin] = fMargin;
    pInfo->m_dwMarginFlag |= (1 << eMargin);
  }
  return FWL_ERR_Succeeded;
}
示例#6
0
FX_BOOL CFWL_GridImp::GetWidgetMargin(IFWL_Widget* pWidget,
                                      FWL_GRIDMARGIN eMargin,
                                      FX_FLOAT& fMargin) {
  CFWL_GridWidgetInfo* pInfo =
      static_cast<CFWL_GridWidgetInfo*>(GetWidgetInfo(pWidget));
  if (pInfo) {
    fMargin = pInfo->m_Margin[eMargin];
    return (pInfo->m_dwMarginFlag & (1 << eMargin)) != 0;
  }
  return FALSE;
}
示例#7
0
FX_FLOAT CFWL_GridImp::GetWidgetSize(IFWL_Widget* pWidget,
                                     FWL_GRIDSIZE eSize,
                                     FWL_GRIDUNIT& eUnit) {
  CFWL_GridWidgetInfo* pInfo =
      static_cast<CFWL_GridWidgetInfo*>(GetWidgetInfo(pWidget));
  if (pInfo) {
    eUnit = pInfo->m_Size[eSize].eUnit;
    return pInfo->m_Size[eSize].fLength;
  }
  return 0;
}
示例#8
0
FWL_ERR CFWL_GridImp::SetWidgetSize(IFWL_Widget* pWidget,
                                    FWL_GRIDSIZE eSize,
                                    FX_FLOAT fSize,
                                    FWL_GRIDUNIT eUit) {
  CFWL_GridWidgetInfo* pInfo =
      static_cast<CFWL_GridWidgetInfo*>(GetWidgetInfo(pWidget));
  if (pInfo) {
    pInfo->m_Size[eSize].fLength = fSize;
    pInfo->m_Size[eSize].eUnit = eUit;
  }
  return FWL_ERR_Succeeded;
}
示例#9
0
ECode PreviewInflater::InflatePreview(
    /* [in] */ IIntent* intent,
    /* [out] */ IView** view)
{
    VALIDATE_NOT_NULL(view);
    AutoPtr<WidgetInfo> info = GetWidgetInfo(intent);
    if (info == NULL) {
        *view = NULL;
        return NOERROR;
    }
    AutoPtr<IView> v = InflateWidgetView(info);
    if (v == NULL) {
        *view = NULL;
        return NOERROR;
    }
    AutoPtr<IKeyguardPreviewContainer> container = new KeyguardPreviewContainer(mContext, NULL);
    IViewGroup::Probe(container)->AddView(v);
    *view = IView::Probe(container);
    return NOERROR;
}