void CCxImageCtrl::OnLButtonDblClk(UINT nFlags, CPoint point) { switch (GetState()) { case CCxImageCtrl::IS_TextMove: if (m_pTextComment != NULL) { CTextCommentSettings settingsDlg(this); settingsDlg.m_fontColor = m_TextColor; settingsDlg.m_fontSize = m_TextSize; settingsDlg.m_fontName = m_FontName; settingsDlg.SetCommentText(m_pTextComment->GetText()); settingsDlg.SetFont(m_pTextComment->GetFont()); settingsDlg.SetColor(m_pTextComment->GetColor()); if(settingsDlg.DoModal()==IDOK) { m_TextColor = settingsDlg.m_fontColor; m_TextSize = settingsDlg.m_fontSize; m_FontName = settingsDlg.m_fontName; m_pTextComment->SetColor(m_TextColor); m_pTextComment->SetText(settingsDlg.GetCommentText()); m_pTextComment->SetFont(settingsDlg.m_Font, GetDC()); m_hImage.Copy(m_hImageBuffer); m_pTextComment->DrawText(m_hImage, CPaintDC(GetDesktopWindow())); Invalidate(FALSE); } } break; } CWnd::OnLButtonDblClk(nFlags, point); }
void PHPWorkspaceView::OnProjectSettings(wxCommandEvent& event) { PHPProjectSettingsDlg settingsDlg(FRAME, DoGetSelectedProject()); settingsDlg.ShowModal(); }
void PHPWorkspaceView::OnActiveProjectSettings(wxCommandEvent& event) { PHPProjectSettingsDlg settingsDlg(FRAME, PHPWorkspace::Get()->GetActiveProjectName()); settingsDlg.ShowModal(); }
void CCxImageCtrl::OnLButtonDown(UINT nFlags, CPoint point) { CPoint imagePoint(point); ClientToImage(imagePoint); CRect clientRect; GetClientRect(&clientRect); if(m_hImage.IsInside(imagePoint.x,imagePoint.y)) { switch(GetState()) { case CCxImageCtrl::IS_Move: if (m_pTextComment) { delete m_pTextComment; m_pTextComment = NULL; } SetCapture(); m_bCaptureWasSet = TRUE; SetCursor(AfxGetApp()->LoadCursor(IDC_HANDCATCHCURSOR2)); m_RefScroll = CSize(m_nHScrollPos,m_nVScrollPos); m_RefPoint = point; break; case CCxImageCtrl::IS_Crop: if (m_pTextComment) { delete m_pTextComment; m_pTextComment = NULL; } SetCapture(); m_bCaptureWasSet = TRUE; SetCursor(AfxGetApp()->LoadCursor(IDC_SELECTCURSOR)); m_RefScroll = CSize(m_nHScrollPos,m_nVScrollPos); m_RefPoint = point; ClientToImage(m_RefPoint); ImageToClient(m_RefPoint); break; case CCxImageCtrl::IS_Pen: if (m_pTextComment) { delete m_pTextComment; m_pTextComment = NULL; } SaveImageToUndo(); SetCapture(); m_bCaptureWasSet = TRUE; SetCursor(AfxGetApp()->LoadCursor(IDC_PENCURSOR)); m_RefScroll = CSize(m_nHScrollPos,m_nVScrollPos); m_RefPoint = point; break; case IS_TextMove: SetCapture(); m_RefOffset= m_pTextComment->GetPosition() - imagePoint; m_bCaptureWasSet = TRUE; break; case CCxImageCtrl::IS_Text: SaveImageToUndo(); SetCapture(); m_bCaptureWasSet = TRUE; SetCursor(AfxGetApp()->LoadCursor(IDC_TEXTCURSOR)); m_RefScroll = CSize(m_nHScrollPos, m_nVScrollPos); m_RefPoint = imagePoint; CTextCommentSettings settingsDlg(this); settingsDlg.m_fontColor = m_TextColor; settingsDlg.m_fontSize = m_TextSize; settingsDlg.m_fontName = m_FontName; if(settingsDlg.DoModal()==IDOK) { m_TextColor = settingsDlg.m_fontColor; m_TextSize = settingsDlg.m_fontSize; m_FontName = settingsDlg.m_fontName; if (m_pTextComment) { delete m_pTextComment; m_pTextComment = NULL; } m_pTextComment = new CTextComment(m_RefPoint); m_pTextComment->SetColor(settingsDlg.m_fontColor); m_pTextComment->SetText(settingsDlg.GetCommentText()); m_pTextComment->SetFont(settingsDlg.m_Font, GetDC()); m_hImageBuffer.Copy(m_hImage); m_pTextComment->DrawText(m_hImage, CPaintDC(GetDesktopWindow())); Invalidate(FALSE); } break; } } CWnd::OnLButtonDown(nFlags, point); }