Example #1
0
FX_BOOL CFFL_IFormFiller::OnLButtonUp(CPDFSDK_PageView* pPageView,
                                      CPDFSDK_Annot* pAnnot,
                                      FX_UINT nFlags,
                                      const CPDF_Point& point) {
    ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
    CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
    CPDFSDK_Document* pDocument = m_pApp->GetSDKDocument();

    switch (pWidget->GetFieldType()) {
    case FIELDTYPE_PUSHBUTTON:
    case FIELDTYPE_CHECKBOX:
    case FIELDTYPE_RADIOBUTTON:
        if (GetViewBBox(pPageView, pAnnot).Contains((int)point.x, (int)point.y))
            pDocument->SetFocusAnnot(pAnnot);
        break;
    default:
        pDocument->SetFocusAnnot(pAnnot);
        break;
    }

    FX_BOOL bRet = FALSE;

    if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) {
        bRet = pFormFiller->OnLButtonUp(pPageView, pAnnot, nFlags, point);
    }

    if (pDocument->GetFocusAnnot() == pAnnot) {
        FX_BOOL bExit = FALSE;
        FX_BOOL bReset = FALSE;
        OnButtonUp(pWidget, pPageView, bReset, bExit, nFlags);
        if (bExit)
            return TRUE;
    }
    return bRet;
}
Example #2
0
//////////////////
// detail: Note that this works for input only
//
UINT CDragDropMgr::ProcessMessage(const MSG* pMsg, BOOL bAllowNcDrag)
{
    if (!m_pMainWnd)
        return FALSE;

	const MSG& msg = *pMsg;

	if (IsSourceWnd(msg.hwnd)) 
    {
		if (msg.message == WM_LBUTTONDOWN || (bAllowNcDrag && msg.message == WM_NCLBUTTONDOWN) ||
			msg.message == WM_RBUTTONDOWN || (bAllowNcDrag && msg.message == WM_NCRBUTTONDOWN)) 
			return OnButtonDown(msg);

        else if (msg.message == WM_MOUSEMOVE) 
			return OnMouseMove(msg);

        else if (msg.message == WM_LBUTTONUP || msg.message == WM_RBUTTONUP) 
			return OnButtonUp(msg);

        else if (m_iState && ((msg.message == WM_KEYDOWN && msg.wParam == VK_ESCAPE) ||
							   msg.message == WM_CONTEXTMENU || msg.message == WM_KILLFOCUS)) 
        {
			SendDragMessage(WM_DD_DRAGABORT);
			SetState(NONE);

			return TRUE;
		}
	}
	return FALSE;
}
Example #3
0
HRESULT	CBMWnd::OnButtonUp(WPARAM wParam, LPARAM lParam)
{
	POINT	ptMouse;
	ptMouse.x = LOWORD(lParam);
	ptMouse.y = HIWORD(lParam);
	
	return OnButtonUp(ptMouse);
}
Example #4
0
LRESULT CSVGGradientEditCtl::OnLButtonUp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
	POINT point;
	point.x = (short)LOWORD(lParam);
	point.y = (short)HIWORD(lParam);

	OnButtonUp(wParam, point, 0);

	return 0;
}
Example #5
0
void Player::handleEvent(Event* evt)
{
	if (evt->get_eventPhase() != CAPTURING_PHASE)
	{
		if (*evt->get_type() == L"mousedown")
		{
			evt->stopPropagation();
			OnButtonDown(dynamic_cast<UI::MouseEvent*>(evt));
		}
		else if (*evt->get_type() == L"mouseup")
		{
			evt->stopPropagation();
			OnButtonUp(dynamic_cast<UI::MouseEvent*>(evt));
		}
		else if (*evt->get_type() == L"mousemove")
		{
			evt->stopPropagation();
			OnMouseMove(dynamic_cast<UI::MouseEvent*>(evt));
		}
	}
}
ManageBookmarksDlg::ManageBookmarksDlg(QWidget* parent):QDialog(parent)
{
	setupUi(this);

	for(int i=0;i<KpxBookmarks::count();i++){
		QListWidgetItem* item=new QListWidgetItem(ListWidget);
		item->setData(Qt::UserRole,i);
		item->setText(KpxBookmarks::title(i));
	}
    connect(Button_Add,SIGNAL(clicked()),this,SLOT(OnButtonAdd()));
    connect(Button_Edit,SIGNAL(clicked()),this,SLOT(OnButtonEdit()));
    connect(Button_Delete,SIGNAL(clicked()),this,SLOT(OnButtonDelete()));
    connect(Button_Up,SIGNAL(clicked()),this,SLOT(OnButtonUp()));
	connect(Button_Down,SIGNAL(clicked()),this,SLOT(OnButtonDown()));
	connect(ListWidget,SIGNAL(itemDoubleClicked(QListWidgetItem*)),this,SLOT(edit(QListWidgetItem*)));
	connect(buttonBox->button(QDialogButtonBox::Close),SIGNAL(clicked()),this,SLOT(close()));

    Button_Add->setIcon(getIcon("bookmark_add"));
	Button_Edit->setIcon(getIcon("bookmark_edit"));
    Button_Delete->setIcon(getIcon("bookmark_del"));
    Button_Up->setIcon(getIcon("up"));
    Button_Down->setIcon(getIcon("down"));
}
Example #7
0
bool CFFL_InteractiveFormFiller::OnLButtonUp(CPDFSDK_PageView* pPageView,
                                             CPDFSDK_Annot::ObservedPtr* pAnnot,
                                             uint32_t nFlags,
                                             const CFX_PointF& point) {
  ASSERT((*pAnnot)->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET);
  CPDFSDK_Widget* pWidget = ToCPDFSDKWidget(pAnnot->Get());

  bool bSetFocus;
  switch (pWidget->GetFieldType()) {
    case FormFieldType::kPushButton:
    case FormFieldType::kCheckBox:
    case FormFieldType::kRadioButton: {
      FX_RECT bbox = GetViewBBox(pPageView, pAnnot->Get());
      bSetFocus =
          bbox.Contains(static_cast<int>(point.x), static_cast<int>(point.y));
      break;
    }
    default:
      bSetFocus = true;
      break;
  }
  if (bSetFocus)
    m_pFormFillEnv->SetFocusAnnot(pAnnot);

  CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot->Get(), false);
  bool bRet = pFormFiller &&
              pFormFiller->OnLButtonUp(pPageView, pAnnot->Get(), nFlags, point);
  if (m_pFormFillEnv->GetFocusAnnot() != pAnnot->Get())
    return bRet;
  if (OnButtonUp(pAnnot, pPageView, nFlags) || !pAnnot)
    return true;
#ifdef PDF_ENABLE_XFA
  if (OnClick(pAnnot, pPageView, nFlags) || !pAnnot)
    return true;
#endif  // PDF_ENABLE_XFA
  return bRet;
}
Example #8
0
void CMyTreeCtrl::OnRButtonUp(UINT nFlags, CPoint point)
{
	OnButtonUp();
	CTreeCtrl::OnRButtonUp(nFlags, point);
}
Example #9
0
void CuListCtrlLoggedEvent::OnRButtonUp(UINT nFlags, CPoint point) 
{
	OnButtonUp (point);
	CuListCtrlVScrollEvent::OnRButtonUp(nFlags, point);
}
Example #10
0
void CMyListCtrl::OnRButtonUp(UINT nFlags, CPoint point)
{
    OnButtonUp(point);
    CListCtrl::OnRButtonUp(nFlags, point);
}