您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetTextPeer函数代码示例

51自学网 2021-06-01 21:16:17
  C++
这篇教程C++ GetTextPeer函数代码示例写得很实用,希望能帮到您。

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

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

示例1: wxCHECK_RET

void wxTextEntry::Cut(){    wxCHECK_RET( GetTextPeer(), "Must create the control first" );    if (CanCut())        GetTextPeer()->Cut() ;}
开发者ID:chromylei,项目名称:third_party,代码行数:7,


示例2: GetTextPeer

bool wxTextCtrl::SetStyle(long start, long end, const wxTextAttr& style){    if (GetTextPeer())        GetTextPeer()->SetStyle( start , end , style ) ;    return true ;}
开发者ID:CustomCardsOnline,项目名称:wxWidgets,代码行数:7,


示例3: wxCHECK_MSG

bool wxTextEntry::CanRedo() const{    if ( !IsEditable() )        return false ;    wxCHECK_MSG( GetTextPeer(), false, "Must create the control first" );    return GetTextPeer()->CanRedo() ;}
开发者ID:chromylei,项目名称:third_party,代码行数:9,


示例4: SetHint

bool wxTextCtrl::SetHint(const wxString& hint){    m_hintString = hint;        if ( GetTextPeer() && GetTextPeer()->SetHint(hint) )        return true;        return false;}
开发者ID:CustomCardsOnline,项目名称:wxWidgets,代码行数:9,


示例5: OnContextMenu

void wxTextCtrl::OnContextMenu(wxContextMenuEvent& event){    if ( GetTextPeer()->HasOwnContextMenu() )    {        event.Skip() ;        return ;    }#if wxUSE_MENUS    if (m_privateContextMenu == NULL)    {        m_privateContextMenu = new wxMenu;        m_privateContextMenu->Append(wxID_UNDO, _("&Undo"));        m_privateContextMenu->Append(wxID_REDO, _("&Redo"));        m_privateContextMenu->AppendSeparator();        m_privateContextMenu->Append(wxID_CUT, _("Cu&t"));        m_privateContextMenu->Append(wxID_COPY, _("&Copy"));        m_privateContextMenu->Append(wxID_PASTE, _("&Paste"));        m_privateContextMenu->Append(wxID_CLEAR, _("&Delete"));        m_privateContextMenu->AppendSeparator();        m_privateContextMenu->Append(wxID_SELECTALL, _("Select &All"));    }    PopupMenu(m_privateContextMenu);#endif}
开发者ID:CustomCardsOnline,项目名称:wxWidgets,代码行数:26,


示例6: MacSetupCursor

bool wxTextCtrl::MacSetupCursor( const wxPoint& pt ){    if ( !GetTextPeer()->SetupCursor( pt ) )        return wxWindow::MacSetupCursor( pt ) ;    else        return true ;}
开发者ID:CustomCardsOnline,项目名称:wxWidgets,代码行数:7,


示例7: DontCreatePeer

bool wxTextCtrl::Create( wxWindow *parent,    wxWindowID id,    const wxString& str,    const wxPoint& pos,    const wxSize& size,    long style,    const wxValidator& validator,    const wxString& name ){    DontCreatePeer();    m_editable = true ;    if ( ! (style & wxNO_BORDER) )        style = (style & ~wxBORDER_MASK) | wxSUNKEN_BORDER ;    if ( !wxTextCtrlBase::Create( parent, id, pos, size, style & ~(wxHSCROLL | wxVSCROLL), validator, name ) )        return false;    if ( m_windowStyle & wxTE_MULTILINE )    {        // always turn on this style for multi-line controls        m_windowStyle |= wxTE_PROCESS_ENTER;        style |= wxTE_PROCESS_ENTER ;    }    SetPeer(wxWidgetImpl::CreateTextControl( this, GetParent(), GetId(), str, pos, size, style, GetExtraStyle() ));    MacPostControlCreate(pos, size) ;#if wxOSX_USE_COCOA    // under carbon everything can already be set before the MacPostControlCreate embedding takes place    // but under cocoa for single line textfields this only works after everything has been set up    GetTextPeer()->SetStringValue(str);#endif    // only now the embedding is correct and we can do a positioning update    MacSuperChangedPosition() ;    if ( m_windowStyle & wxTE_READONLY)        SetEditable( false ) ;    SetCursor( wxCursor( wxCURSOR_IBEAM ) ) ;    return true;}
开发者ID:CustomCardsOnline,项目名称:wxWidgets,代码行数:47,


示例8: GetTextPeer

void wxTextCtrl::OSXEnableAutomaticDashSubstitution(bool enable){    GetTextPeer()->EnableAutomaticDashSubstitution(enable);}
开发者ID:bsmr-c-cpp,项目名称:wxWidgets,代码行数:4,


示例9: OnChar

void wxTextCtrl::OnChar(wxKeyEvent& event){    int key = event.GetKeyCode() ;    bool eat_key = false ;    long from, to;    if ( !IsEditable() && !event.IsKeyInCategory(WXK_CATEGORY_ARROW | WXK_CATEGORY_TAB) &&        !( key == WXK_RETURN && ( (m_windowStyle & wxTE_PROCESS_ENTER) || (m_windowStyle & wxTE_MULTILINE) ) )//        && key != WXK_PAGEUP && key != WXK_PAGEDOWN && key != WXK_HOME && key != WXK_END        )    {        // eat it        return ;    }    if ( !GetTextPeer()->CanClipMaxLength() )    {        // Check if we have reached the max # of chars (if it is set), but still        // allow navigation and deletion        GetSelection( &from, &to );        if ( !IsMultiLine() && m_maxLength && GetValue().length() >= m_maxLength &&            !event.IsKeyInCategory(WXK_CATEGORY_ARROW | WXK_CATEGORY_TAB | WXK_CATEGORY_CUT) &&            !( key == WXK_RETURN && (m_windowStyle & wxTE_PROCESS_ENTER) ) &&            from == to )        {            // eat it, we don't want to add more than allowed # of characters            // TODO: generate EVT_TEXT_MAXLEN()            return;        }    }    // assume that any key not processed yet is going to modify the control    m_dirty = true;    switch ( key )    {        case WXK_RETURN:            if (m_windowStyle & wxTE_PROCESS_ENTER)            {                wxCommandEvent event(wxEVT_TEXT_ENTER, m_windowId);                event.SetEventObject( this );                event.SetString( GetValue() );                if ( HandleWindowEvent(event) )                    return;            }            if ( !(m_windowStyle & wxTE_MULTILINE) )            {                wxTopLevelWindow *tlw = wxDynamicCast(wxGetTopLevelParent(this), wxTopLevelWindow);                if ( tlw && tlw->GetDefaultItem() )                {                    wxButton *def = wxDynamicCast(tlw->GetDefaultItem(), wxButton);                    if ( def && def->IsEnabled() )                    {                        wxCommandEvent event(wxEVT_BUTTON, def->GetId() );                        event.SetEventObject(def);                        def->Command(event);                        return ;                    }                }                // this will make wxWidgets eat the ENTER key so that                // we actually prevent line wrapping in a single line text control                eat_key = true;            }            break;        case WXK_TAB:            if ( !(m_windowStyle & wxTE_PROCESS_TAB))            {                int flags = 0;                if (!event.ShiftDown())                    flags |= wxNavigationKeyEvent::IsForward ;                if (event.ControlDown())                    flags |= wxNavigationKeyEvent::WinChange ;                Navigate(flags);                return;            }            else            {                // This is necessary (don't know why);                // otherwise the tab will not be inserted.                WriteText(wxT("/t"));                eat_key = true;            }            break;        default:            break;    }    if (!eat_key)    {        // perform keystroke handling        event.Skip(true) ;    }//.........这里部分代码省略.........
开发者ID:CustomCardsOnline,项目名称:wxWidgets,代码行数:101,


示例10: GetTextPeer

bool wxTextEntry::SetHint(const wxString& hint){    m_hintString = hint;    return GetTextPeer() && GetTextPeer()->SetHint(hint);}
开发者ID:chromylei,项目名称:third_party,代码行数:5,



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


C++ GetThread函数代码示例
C++ GetTextLength函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。