本文整理汇总了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();
}