当前位置: 首页>>代码示例>>C++>>正文


C++ wxNotebookEvent::GetExtraLong方法代码示例

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


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

示例1: OnPageChanged

void wxSTEditorNotebook::OnPageChanged(wxNotebookEvent &event)
{
    // this is our fake event to ensure selection is correct
    if (event.GetString() == wxT("wxSTEditorNotebook Page Change"))
    {
        SetSelection(event.GetExtraLong()); // FIXME no Clone in wxNotebookEvent
        return;
    }

    wxSTERecursionGuard guard(m_rGuard_UpdatePageState);
    bool update_page_state = !guard.IsInside();

#if defined(__WXMSW__) && (wxVERSION_NUMBER < 2902) // OnSelChange() removed in trunk
    // let the msw notebook really change the page first
    wxNotebook::OnSelChange(event);
    event.Skip(false);
#else
    // trac.wxwidgets.org/ticket/12688, fixed now
    event.Skip();
#endif

    int sel = event.GetSelection();

    // NOTE: GTK selection can get out of sync, we "fix" it in GetEditorSplitter
    //if (sel >= wxNotebook::GetPageCount())
    //    sel = wxNotebook::GetPageCount()-1;

    // make sure the cursor is shown by setting the STC focus
    if ((sel >= 0) && GetEditor(sel))
    {
        GetEditor(sel)->SetSTCFocus(true);
        GetEditor(sel)->SetFocus();
    }

    if (update_page_state) UpdatePageState();
}
开发者ID:Abyss116,项目名称:luaplus51-all,代码行数:36,代码来源:stenoteb.cpp


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