本文整理汇总了C++中wxTreeEvent::GetPoint方法的典型用法代码示例。如果您正苦于以下问题:C++ wxTreeEvent::GetPoint方法的具体用法?C++ wxTreeEvent::GetPoint怎么用?C++ wxTreeEvent::GetPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxTreeEvent
的用法示例。
在下文中一共展示了wxTreeEvent::GetPoint方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnMenu
void ProjectExplorerWindow::OnMenu(wxTreeEvent& event)
{
if (event.GetInt() == 0)
m_tree->PopupMenu(m_contextMenu, event.GetPoint());
else if (event.GetInt() == 1)
m_tree->PopupMenu(m_directoryContextMenu, event.GetPoint());
}
示例2: OnSolutionRightClicked
void CocosFrame::OnSolutionRightClicked(wxTreeEvent& event) {
wxTreeItemId itemid = event.GetItem();
wxTreeCtrl *solTreeCtrl = (wxTreeCtrl*)FindWindow(ID_SOLUTION_TREECTRL);
CocosTreeItemData *data = itemid.IsOk() ? (CocosTreeItemData*)solTreeCtrl->GetItemData(itemid) : NULL;
if (!data) {
wxLogMessage("Data of tree item clicked is NULL!");
}
wxMenu menu;
if (data->GetKind() == CoKind::Solution) {
menu.Append(ID_SOL_ADD_PROJECT_NEW, _T("new project"));
menu.AppendSeparator();
menu.Append(ID_SOL_ADD_PROJECT_EXIST, _T("add projects existing"));
} else if (data->GetKind() == CoKind::Project) {
menu.Append(ID_POJ_ADD_ANIMATE_NEW, _T("new animate"));
menu.AppendSeparator();
menu.Append(ID_POJ_ADD_FILE_EXIST, _T("add file existing"));
menu.AppendSeparator();
menu.Append(ID_POJ_ADD_FILTER, _T("new filter"));
menu.AppendSeparator();
menu.Append(ID_POJ_REM_PROJECT, _T("remove"));
} else if (data->GetKind() == CoKind::Folder) {
// menu.Append(ID_FOLDER_ADD_ANIMATE_NEW, _T("new animate"));
// menu.AppendSeparator();
// menu.Append(ID_FOLDER_ADD_FILE_EXIST, _T("add file existing"));
} else if (data->GetKind() == CoKind::Filer) {
menu.Append(ID_FILE_REM_FILE, _T("remove"));
}
PopupMenu(&menu, event.GetPoint());
}
示例3:
void
DeckLibraryTab::OnTreeRightClicked (wxTreeEvent &event)
{
if (m_bNoEvents || !m_pTree) return;
m_pTree->SelectItem (event.GetItem ());
m_pTree->PopupMenu (&m_oPopupMenu, event.GetPoint ());
}
示例4: OnItemRightClick
void wxGISIdentifyDlg::OnItemRightClick(wxTreeEvent& event)
{
wxTreeItemId item = event.GetItem();
if(!item.IsOk())
return;
m_pTreeCtrl->SelectItem(item);
PopupMenu(m_pMenu, event.GetPoint());
}
示例5: OnTreeItemRightClick
void ClassBrowser::OnTreeItemRightClick(wxTreeEvent& event)
{
wxTreeCtrl* tree = (wxTreeCtrl*)event.GetEventObject();
if (!tree)
return;
tree->SelectItem(event.GetItem());
ShowMenu(tree, event.GetItem(), event.GetPoint());
}
示例6: directory_ctrlOnTreeItemMenu
void MainWindow::directory_ctrlOnTreeItemMenu( wxTreeEvent& event )
{
wxPoint pt = event.GetPoint();
wxMenu menu(wxEmptyString);
menu.Append(FDBex_ExtractFolder, _("Extract folder to..."));
PopupMenu(&menu, pt);
}
示例7: OnItemMenu
void SkillObjectTree::OnItemMenu(wxTreeEvent& event)
{
wxTreeItemId itemId = event.GetItem();
wxPoint clientpt = event.GetPoint();
wxPoint screenpt = ClientToScreen(clientpt);
ShowMenu(itemId, clientpt);
event.Skip();
}
示例8: OnItemMenu
void ModelListTree::OnItemMenu(wxTreeEvent& event)
{
ModelTreeItemData* itemData = (ModelTreeItemData*)GetItemData(event.GetItem());
Model* model = itemData->GetModel();
wxPoint pt = event.GetPoint();
wxMenu menu;
menu.Append(ID_MODEL_PANEL_ITEM_MENU_ADD_TO_SCENE, wxT("&add to scene"));
PopupMenu(&menu, pt);
}
示例9: OnTreeItemRightClick
// tree item right-clicked
void OpenFilesListPlugin::OnTreeItemRightClick(wxTreeEvent& event)
{
if (Manager::IsAppShuttingDown())
return;
EditorBase* ed = static_cast<EditorBase*>( static_cast<OpenFilesListData*>(m_pTree->GetItemData(event.GetItem()))->GetEditor() );
if (ed)
{
wxPoint pt = m_pTree->ClientToScreen(event.GetPoint());
ed->DisplayContextMenu(pt,mtOpenFilesList);
}
}
示例10: OnSelRightClick
////////////////////////////////////////////////////////////////////////////////
// This handler will display a popup menu for the item at the mouse position
////////////////////////////////////////////////////////////////////////////////
void frmMain::OnSelRightClick(wxTreeEvent& event)
{
wxTreeItemId item = event.GetItem();
if (item != browser->GetSelection())
{
browser->SelectItem(item);
currentObject = browser->GetObject(item);
}
if (currentObject)
doPopup(browser, event.GetPoint(), currentObject);
}
示例11: OnTreeItemRightClick
void EvtSimHlpEvtHandler::OnTreeItemRightClick (wxTreeEvent &event)
{
wxASSERT_MSG (m_treeItemRightClickProcessed == false,
_T("Tree item right click event handler has already been processed"));
m_treeItemRightClickProcessed = true;
wxMenu *m = new wxMenu (_T("PopupMenu"));
m->Append (1234, _T("PopupMenuItem"));
wxPoint p (0, 0);
WxGuiTestHelper::PopupMenu ((wxTreeCtrl *) event.GetEventObject (), m,
event.GetPoint (), _T("sccDatasetBrowserPopupMenu"));
}
示例12: OnItemMenu
void MyTreeCtrl::OnItemMenu(wxTreeEvent& event)
{
wxTreeItemId itemId = event.GetItem();
MyTreeItemData *item = itemId.IsOk() ? (MyTreeItemData *)GetItemData(itemId)
: NULL;
wxPoint clientpt = event.GetPoint();
wxPoint screenpt = ClientToScreen(clientpt);
wxLogMessage(wxT("OnItemMenu for item \"%s\" at screen coords (%i, %i)"),
item ? item->GetDesc() : _T(""), screenpt.x, screenpt.y);
ShowMenu(itemId, clientpt);
event.Skip();
}
示例13: TreeOnBeginDrag
void DecisionLogicFrame::TreeOnBeginDrag(wxTreeEvent& event)
{
// need to explicitly allow drag
if ( ItemIsDraggable(event.GetItem()) )
{
m_draggedItem = event.GetItem();
wxPoint clientpt = event.GetPoint();
wxPoint screenpt = ClientToScreen(clientpt);
m_draiggingName = m_tree->GetItemText(event.GetItem());
event.Allow();
}
}
示例14: OnItemRightClick
void mmCategDialog::OnItemRightClick(wxTreeEvent& event)
{
wxMenu* mainMenu = new wxMenu;
mainMenu->Append(new wxMenuItem(mainMenu, MENU_ITEM_HIDE, _("Hide Selected Category")));
mainMenu->Append(new wxMenuItem(mainMenu, MENU_ITEM_UNHIDE, _("Unhide Selected Category")));
mainMenu->AppendSeparator();
mainMenu->Append(new wxMenuItem(mainMenu, MENU_ITEM_CLEAR, _("Clear Settings")));
bool bItemHidden = (m_treeCtrl->GetItemTextColour(selectedItemId_) != NormalColor_);
mainMenu->Enable(MENU_ITEM_HIDE, !bItemHidden && (selectedItemId_ != root_));
mainMenu->Enable(MENU_ITEM_UNHIDE, bItemHidden && (selectedItemId_ != root_));
PopupMenu(mainMenu, event.GetPoint());
delete mainMenu;
event.Skip();
}
示例15: OnSelRightClick
////////////////////////////////////////////////////////////////////////////////
// This handler will display a popup menu for the item at the mouse position
////////////////////////////////////////////////////////////////////////////////
void frmMain::OnSelRightClick(wxTreeEvent &event)
{
wxTreeItemId item = event.GetItem();
if (item != browser->GetSelection())
{
browser->SelectItem(item);
// Prevent changes to "currentObject" by "execSelchange" function by another
// thread. Will hold the lock until we have the actual object in hand.
s_currentObjectMutex.Lock();
currentObject = browser->GetObject(item);
s_currentObjectMutex.Unlock();
}
if (currentObject)
doPopup(browser, event.GetPoint(), currentObject);
}