• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ wxTreeEvent类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中wxTreeEvent的典型用法代码示例。如果您正苦于以下问题:C++ wxTreeEvent类的具体用法?C++ wxTreeEvent怎么用?C++ wxTreeEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了wxTreeEvent类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: OnTreeItemSelected

void BundlePane::OnTreeItemSelected(wxTreeEvent& event) {
	const wxTreeItemId selItem = event.GetItem();
	const BundleItemData* data = (BundleItemData*)m_bundleTree->GetItemData(selItem);

	// The menu root cannot be removed
	if (data->m_type == BUNDLE_MENU) m_bundleMinus->Disable();
	else m_bundleMinus->Enable();
}
开发者ID:lenoval,项目名称:e,代码行数:8,代码来源:BundlePane.cpp


示例2:

void
mi_frame::on_right_click(wxTreeEvent &event) {
  wxTreeItemId item = event.GetItem();
  if (tree->GetChildrenCount(item) == 0)
    return;

  expand_all_elements(item, !tree->IsExpanded(item));
}
开发者ID:RaceOfAce,项目名称:mkvtoolnix,代码行数:8,代码来源:wxwidgets_ui.cpp


示例3: OnItemActivated

//------------------------------------------------------------------------------
void OutputTree::OnItemActivated(wxTreeEvent &event)
{
   // get some info about this item
   wxTreeItemId itemId = event.GetItem();
   GmatTreeItemData *item = (GmatTreeItemData *)GetItemData(itemId);
   item->SetTitle(GetItemText(itemId));
   GmatAppData::Instance()->GetMainFrame()->CreateChild(item);
}
开发者ID:rockstorm101,项目名称:GMAT,代码行数:9,代码来源:OutputTree.cpp


示例4: OnItemExpanding

void CRemoteTreeView::OnItemExpanding(wxTreeEvent& event)
{
	if (m_busy)
		return;

	wxTreeItemId item = event.GetItem();
	if (!item)
		return;

	if (!ListExpand(item))
	{
		event.Veto();
		return;
	}

	Refresh(false);
}
开发者ID:juaristi,项目名称:filezilla,代码行数:17,代码来源:RemoteTreeView.cpp


示例5: OnBeginDrag

void MyTreeCtrl::OnBeginDrag(wxTreeEvent& event)
{
    // need to explicitly allow drag
    if ( event.GetItem() != GetRootItem() )
    {
        m_draggedItem = event.GetItem();

        wxLogMessage(wxT("OnBeginDrag: started dragging %s"),
                     GetItemText(m_draggedItem).c_str());

        event.Allow();
    }
    else
    {
        wxLogMessage(wxT("OnBeginDrag: this item can't be dragged."));
    }
}
开发者ID:gitrider,项目名称:wxsj2,代码行数:17,代码来源:treetest.cpp


示例6: OnBeginDrag

void ModelListTree::OnBeginDrag(wxTreeEvent& event)
{
	ModelTreeItemData* itemData = (ModelTreeItemData*)GetItemData(event.GetItem());
	Model* model = itemData->GetModel();

	//event.Allow();

}
开发者ID:SinYocto,项目名称:Zee,代码行数:8,代码来源:ModelPanel.cpp


示例7: OnPageChanging

void CSettingsDialog::OnPageChanging(wxTreeEvent& event)
{
	if (!m_activePanel)
		return;

	if (!m_activePanel->Validate())
		event.Veto();
}
开发者ID:idgaf,项目名称:FileZilla3,代码行数:8,代码来源:settingsdialog.cpp


示例8: OnItemActivated

//----------------------------------------------------------------------------
void ProjTree::OnItemActivated(wxTreeEvent& event)
{
	wxTreeItemId id = event.GetItem();
	bool isExpanded = IsExpanded(id);

	if (isExpanded) Collapse(id);
	else Expand(id);
}
开发者ID:whztt07,项目名称:Phoenix3D_2.5,代码行数:9,代码来源:PX2E_ProjTree.cpp


示例9: GetTreeItemData

///////////////////////////////////////////////////////////////////////////////
// GUI callback for when a label is done being edited by the user.  Creates a
// command to change the name of the dependency node associated with the item.
// 
void SceneOutliner::OnEndLabelEdit( wxTreeEvent& args )
{
    if ( !args.IsEditCancelled() )
    {
        SceneOutlinerItemData* data = GetTreeItemData( args.GetItem() );
        Reflect::Object* object = data->GetObject();
        SceneGraph::SceneNode* node = Reflect::SafeCast< SceneGraph::SceneNode >( object );
        if ( node )
        {
            const tstring newName = args.GetLabel().c_str();
            if ( node->GetName() != newName )
            {
                // Create an undoable command to rename the object
                m_CurrentScene->Push( new PropertyUndoCommand<tstring>( new Helium::MemberProperty<SceneGraph::SceneNode, tstring> (node, &SceneGraph::SceneNode::GetName, &SceneGraph::SceneNode::SetGivenName), newName) );
                m_CurrentScene->Execute( false );

                // Sort
                Sort( m_TreeCtrl->GetItemParent( args.GetItem() ) );

                // Keep the item in view
                if ( !m_TreeCtrl->IsVisible( args.GetItem() ) )
                {
                    m_TreeCtrl->EnsureVisible( args.GetItem() );
                }
            }
            args.Veto();
            OnSelectionChanged( (wxTreeEvent)NULL );
        }
    }
}
开发者ID:foolhuang,项目名称:Helium,代码行数:34,代码来源:SceneOutliner.cpp


示例10: UponTreeSelectionChange

void DatabaseView::UponTreeSelectionChange(wxTreeEvent& event)
{
    wxTreeCtrl& tree_ctrl = tree();
    MultiDimGrid& grid_ctrl = grid();

    // save the current selection
    wxTreeItemId const old_item = event.GetOldItem();
    if(old_item.IsOk())
        {
        database_tree_item_data* old_item_data =
            dynamic_cast<database_tree_item_data*>
                (tree_ctrl.GetItemData(old_item)
                );
        if(old_item_data)
            {
            old_item_data->set_axes_selected(grid_ctrl.GetGridAxisSelection());
            }
        }

    database_tree_item_data* item_data =
        dynamic_cast<database_tree_item_data*>
            (tree_ctrl.GetItemData(event.GetItem())
            );
    if(!item_data)
        {
        return;
        }

    table_adapter().SetTDBValue
        (&document().GetTDBValue(item_data->db_name().Idx)
        );

    bool is_topic = tree_ctrl.GetChildrenCount(event.GetItem());

    set_grid_label_text(item_data->db_name().LongName);

    wxSizer* sizer = grid_ctrl.GetContainingSizer();
    LMI_ASSERT(sizer);
    sizer->Show(&grid_ctrl, !is_topic);
    sizer->Layout();

    // restore axis selection if any
    grid_ctrl.SetGridAxisSelection(item_data->get_axes_selected());
    grid_ctrl.RefreshTableFull();
}
开发者ID:vadz,项目名称:lmi.new,代码行数:45,代码来源:database_view.cpp


示例11: wxASSERT

void
AnimationSelector::OnAnimationListSelChanged(wxTreeEvent& e)
{
	// reset the state
	resetState();

    wxTreeItemId item = e.GetItem();

    wxASSERT(item.IsOk());

	wxTreeCtrl* tree = wxStaticCast(e.GetEventObject(), wxTreeCtrl);
    mActivedItem = e.GetItem();

    wxArrayTreeItemIds selections;
    int nCount = tree->GetSelections(selections);

	if(nCount <= 0)
		return;

	if (mIsMeshAnim)
	{
		GetDataManipulator()->changeMeshAnimation(DoActiveItem(item));
		return;
	}

	GetDataManipulator()->changeAnimation(DoActiveItem(item),0.0);

	Fairy::LogicModel* pObjModel = GetDataManipulator()->m_pObjTemplate;

	if ( pObjModel && !pObjModel->getCurrentAnimName().empty())
	{
		
		m_btnPause->Enable(true);
 
 		pObjModel->setAnimEditing(m_bPause);

		Ogre::String animationName = pObjModel->getCurrentAnimName();

		bool bLoop = pObjModel->getAnimationLoop();
		Ogre::Real timeTotal = pObjModel->getAnimationLength(animationName);

		m_endTimeText->SetValue(Ogre::StringConverter::toString(timeTotal));
		m_endFrameText->SetValue(Ogre::StringConverter::toString(timeTotal*STATIC_FPS));
	}
}
开发者ID:gitrider,项目名称:wxsj2,代码行数:45,代码来源:AnimationSelector.cpp


示例12: OnObjetsListSelectionChanged

void ChooseObjectDialog::OnObjetsListSelectionChanged(wxTreeEvent& event)
{
    item = event.GetItem();
    gd::TreeItemStringData * data = dynamic_cast<gd::TreeItemStringData*>(objectsList->GetItemData(item));
    if(!data)
    	ChoisirBt->Disable();
    else
    	ChoisirBt->Enable();
}
开发者ID:victorlevasseur,项目名称:GD,代码行数:9,代码来源:ChooseObjectDialog.cpp


示例13: 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);
}
开发者ID:nybegblya,项目名称:FDB_Extractor2,代码行数:9,代码来源:MainWindow.cpp


示例14: OnItemSelected

void ModelListTree::OnItemSelected(wxTreeEvent& event)
{
	ModelTreeItemData* itemData = (ModelTreeItemData*)GetItemData(event.GetItem());
	Model* model = itemData->GetModel();

	mInspectorPanel->AttachModel(model);
	mInspectorPanel->GetModelPreviewCanvas()->SetPreviewModel(model);
	mInspectorPanel->GetModelPreviewCanvas()->AddjustCameraPos();
}
开发者ID:SinYocto,项目名称:Zee,代码行数:9,代码来源:ModelPanel.cpp


示例15: OnEndLabelEdit

//------------------------------------------------------------------------------
void OutputTree::OnEndLabelEdit(wxTreeEvent &event)
{
   wxString newLabel = event.GetLabel();
   
   // check to see if label is a single word
   if (newLabel.IsWord())
   {
      GmatTreeItemData *selItem = (GmatTreeItemData *)
         GetItemData(GetSelection());
      
      wxString oldLabel = selItem->GetName();
      selItem->SetName(newLabel);
   }
   else
   {
      event.Veto();
   }
}
开发者ID:rockstorm101,项目名称:GMAT,代码行数:19,代码来源:OutputTree.cpp


示例16: OnItemActivated

void SFTPTreeView::OnItemActivated(wxTreeEvent& event)
{
    event.Skip();
    MyClientData* cd = GetItemData(event.GetItem());
    CHECK_PTR_RET(cd);

    if(cd->IsFolder()) {
        wxTreeItemId item = event.GetItem();
        if(m_treeCtrl->IsExpanded(item)) {
            m_treeCtrl->CallAfter(&wxTreeCtrl::Collapse, item);
        } else {
            m_treeCtrl->CallAfter(&wxTreeCtrl::Expand, item);
        }

    } else {
        DoOpenFile(cd->GetFullPath());
    }
}
开发者ID:lpc1996,项目名称:codelite,代码行数:18,代码来源:SFTPTreeView.cpp


示例17: OnItemExpanding

void CLocalTreeView::OnItemExpanding(wxTreeEvent& event)
{
	wxTreeItemId item = event.GetItem();

	wxTreeItemIdValue value;
	wxTreeItemId child = GetFirstChild(item, value);
	if (child && GetItemText(child) == _T(""))
		DisplayDir(item, GetDirFromItem(item));
}
开发者ID:Hellcenturion,项目名称:MILF,代码行数:9,代码来源:LocalTreeView.cpp


示例18: 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 do popup on the respective object.
		//
		s_currentObjectMutex.Lock();
		currentObject = browser->GetObject(item);
	}

	if (currentObject)
		doPopup(browser, event.GetPoint(), currentObject);
	s_currentObjectMutex.Unlock();
}
开发者ID:FabianCollaguazo,项目名称:pgadmin3,代码行数:21,代码来源:events.cpp


示例19: OnBeginLabelEdit

void CBookmarksDialog::OnBeginLabelEdit(wxTreeEvent& event)
{
	wxTreeItemId item = event.GetItem();
	if (item != m_pTree->GetSelection())
	{
		if (!Verify())
		{
			event.Veto();
			return;
		}
	}

	if (!item || item == m_bookmarks_global || item == m_bookmarks_site)
	{
		event.Veto();
		return;
	}
}
开发者ID:idgaf,项目名称:filezilla,代码行数:18,代码来源:bookmarks_dialog.cpp


示例20: OnItemActivate

void DbViewerPanel::OnItemActivate(wxTreeEvent& event)
{
    try {
        DbItem* item = (DbItem*) m_treeDatabases->GetItemData(event.GetItem());
        if (item) {
            wxMouseState cState = ::wxGetMouseState();

            wxString pagename;
            if (Table* tab = wxDynamicCast(item->GetData(), Table)) {
                if( cState.ControlDown() ) {
                    pagename = CreatePanelName(tab, DbViewerPanel::Erd);
                    ErdPanel *erdpanel = new ErdPanel(m_pNotebook,tab->GetDbAdapter()->Clone(),m_pConnections, (Table*) tab->Clone() );
                    AddEditorPage(erdpanel, pagename);

                } else {
    #if defined (__WXMSW__)
                    clWindowUpdateLocker locker(m_mgr->GetEditorPaneNotebook());
    #endif
                    pagename = CreatePanelName(tab, DbViewerPanel::Sql);
                    if(!DoSelectPage(pagename)) {
                        SQLCommandPanel *sqlpage = new SQLCommandPanel(m_pNotebook,tab->GetDbAdapter()->Clone(),tab->GetParentName(),tab->GetName());
                        AddEditorPage(sqlpage, pagename);
                    }
                }
            }

            if (View* pView = wxDynamicCast(item->GetData(), View)) {
                pagename = CreatePanelName(pView, DbViewerPanel::Sql);
                if(!DoSelectPage(pagename)) {
                    SQLCommandPanel *sqlpage = new SQLCommandPanel(m_pNotebook,pView->GetDbAdapter()->Clone(),pView->GetParentName(),pView->GetName());
                    AddEditorPage(sqlpage, pagename);
                }
            }

            if (Database* db = wxDynamicCast(item->GetData(), Database)) {
                if( cState.ControlDown() ) {
                    pagename = CreatePanelName(db, DbViewerPanel::Erd);
                    ErdPanel *erdpanel = new ErdPanel(m_pNotebook,db->GetDbAdapter()->Clone(),m_pConnections,(Database*)db->Clone());
                    AddEditorPage(erdpanel, pagename);

                } else {
                    pagename = CreatePanelName(db, DbViewerPanel::Sql);
                    if(!DoSelectPage(pagename)) {
                        SQLCommandPanel *sqlpage = new SQLCommandPanel(m_pNotebook,db->GetDbAdapter()->Clone(),db->GetName(),wxT(""));
    #ifndef __WXMSW__
                        sqlpage->Show();
    #endif
                        AddEditorPage(sqlpage, pagename);
                    }
                }
            }
        }
        
    } catch (DatabaseLayerException &e) {
        ::wxMessageBox(wxString() << "Error occured while opening SQL panel: " << e.GetErrorMessage(), "Database Explorer", wxOK|wxICON_ERROR|wxCENTER);
    }
}
开发者ID:HTshandou,项目名称:codelite,代码行数:57,代码来源:DbViewerPanel.cpp



注:本文中的wxTreeEvent类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ wxTreeItemId类代码示例发布时间:2022-05-31
下一篇:
C++ wxTimerEvent类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap