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


C++ GetVListBoxComboPopup函数代码示例

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


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

示例1: EnsurePopupControl

int wxOwnerDrawnComboBox::DoInsertItems(const wxArrayStringsAdapter& items,
                                        unsigned int pos,
                                        void **clientData,
                                        wxClientDataType type)
{
    EnsurePopupControl();

    const unsigned int count = items.GetCount();

    if ( HasFlag(wxCB_SORT) )
    {
        int n = pos;

        for ( unsigned int i = 0; i < count; ++i )
        {
            n = GetVListBoxComboPopup()->Append(items[i]);
            AssignNewItemClientData(n, clientData, i, type);
        }

        return n;
    }
    else
    {
        for ( unsigned int i = 0; i < count; ++i, ++pos )
        {
            GetVListBoxComboPopup()->Insert(items[i], pos);
            AssignNewItemClientData(pos, clientData, i, type);
        }

        return pos - 1;
    }
}
开发者ID:beanhome,项目名称:dev,代码行数:32,代码来源:odcombo.cpp

示例2: GetVListBoxComboPopup

void* wxOwnerDrawnComboBox::DoGetItemClientData(unsigned int n) const
{
    if ( !m_popupInterface )
        return NULL;

    return GetVListBoxComboPopup()->GetItemClientData(n);
}
开发者ID:beanhome,项目名称:dev,代码行数:7,代码来源:odcombo.cpp

示例3: EnsurePopupControl

int wxOwnerDrawnComboBox::DoAppend(const wxString& item)
{
    EnsurePopupControl();
    wxASSERT(m_popupInterface);

    return GetVListBoxComboPopup()->Append(item);
}
开发者ID:252525fb,项目名称:rpcs3,代码行数:7,代码来源:odcombo.cpp

示例4: GetValue

void ODIconCombo::OnDrawItem( wxDC& dc,
                                       const wxRect& rect,
                                       int item,
                                       int flags ) const
{
    int offset_x = bmpArray.Item(item).GetWidth();
    int bmpHeight = bmpArray.Item(item).GetHeight();
    dc.DrawBitmap(bmpArray.Item(item), rect.x, rect.y + (rect.height - bmpHeight)/2, true);
    
    if ( flags & wxODCB_PAINTING_CONTROL )
    {
        wxString text = GetValue();
        int margin_x = 2;
        
#if wxCHECK_VERSION(2, 9, 0)
        if ( ShouldUseHintText() )
        {
            text = GetHint();
            wxColour col = wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT);
            dc.SetTextForeground(col);
        }
        
        margin_x = GetMargins().x;
#endif

        dc.DrawText( text,
                     rect.x + margin_x + offset_x,
                     (rect.height-dc.GetCharHeight())/2 + rect.y );
    }
    else
    {
        dc.DrawText( GetVListBoxComboPopup()->GetString(item), rect.x + 2 + offset_x, (rect.height-dc.GetCharHeight())/2 + rect.y );
    }
}
开发者ID:nohal,项目名称:ocpn_draw_pi,代码行数:34,代码来源:ODIconCombo.cpp

示例5: GetValue

void wxOwnerDrawnComboBox::OnDrawItem( wxDC& dc,
                                       const wxRect& rect,
                                       int item,
                                       int flags ) const
{
    if ( flags & wxODCB_PAINTING_CONTROL )
    {
        wxString text;

        if ( !ShouldUseHintText() )
        {
            text = GetValue();
        }
        else
        {
            text = GetHint();
            wxColour col = wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT);
            dc.SetTextForeground(col);
        }

        dc.DrawText( text,
                     rect.x + GetMargins().x,
                     (rect.height-dc.GetCharHeight())/2 + rect.y );
    }
    else
    {
        dc.DrawText( GetVListBoxComboPopup()->GetString(item), rect.x + 2, rect.y );
    }
}
开发者ID:beanhome,项目名称:dev,代码行数:29,代码来源:odcombo.cpp

示例6: wxCHECK_MSG

wxString wxOwnerDrawnComboBox::GetString(unsigned int n) const
{
    wxCHECK_MSG( IsValid(n), wxEmptyString, wxT("invalid index in wxOwnerDrawnComboBox::GetString") );

    if ( !m_popupInterface )
        return m_initChs.Item(n);

    return GetVListBoxComboPopup()->GetString(n);
}
开发者ID:beanhome,项目名称:dev,代码行数:9,代码来源:odcombo.cpp

示例7: wxCHECK_RET

void wxOwnerDrawnComboBox::DoDeleteOneItem(unsigned int n)
{
    wxCHECK_RET( IsValid(n), wxT("invalid index in wxOwnerDrawnComboBox::Delete") );

    if ( GetSelection() == (int) n )
        ChangeValue(wxEmptyString);

    GetVListBoxComboPopup()->Delete(n);
}
开发者ID:beanhome,项目名称:dev,代码行数:9,代码来源:odcombo.cpp

示例8: wxVListBoxComboPopup

void wxOwnerDrawnComboBox::DoSetPopupControl(wxComboPopup* popup)
{
    if ( !popup )
    {
        popup = new wxVListBoxComboPopup();
    }

    wxComboCtrl::DoSetPopupControl(popup);

    wxASSERT(popup);

    // Add initial choices to the wxVListBox
    if ( !GetVListBoxComboPopup()->GetCount() )
    {
        GetVListBoxComboPopup()->Populate(m_initChs);
        m_initChs.Clear();
    }
}
开发者ID:beanhome,项目名称:dev,代码行数:18,代码来源:odcombo.cpp

示例9: EnsurePopupControl

void wxOwnerDrawnComboBox::DoClear()
{
    EnsurePopupControl();

    GetVListBoxComboPopup()->Clear();

    // There is no text entry when using wxCB_READONLY style, so test for it.
    if ( GetTextCtrl() )
        wxTextEntry::Clear();
}
开发者ID:catalinr,项目名称:wxWidgets,代码行数:10,代码来源:odcombo.cpp

示例10: GetValue

void wxOwnerDrawnComboBox::OnDrawItem( wxDC& dc,
                                       const wxRect& rect,
                                       int item,
                                       int flags ) const
{
    if ( flags & wxODCB_PAINTING_CONTROL )
    {
        dc.DrawText( GetValue(),
                     rect.x + GetTextIndent(),
                     (rect.height-dc.GetCharHeight())/2 + rect.y );
    }
    else
    {
        dc.DrawText( GetVListBoxComboPopup()->GetString(item), rect.x + 2, rect.y );
    }
}
开发者ID:252525fb,项目名称:rpcs3,代码行数:16,代码来源:odcombo.cpp


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