本文整理汇总了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;
}
}
示例2: GetVListBoxComboPopup
void* wxOwnerDrawnComboBox::DoGetItemClientData(unsigned int n) const
{
if ( !m_popupInterface )
return NULL;
return GetVListBoxComboPopup()->GetItemClientData(n);
}
示例3: EnsurePopupControl
int wxOwnerDrawnComboBox::DoAppend(const wxString& item)
{
EnsurePopupControl();
wxASSERT(m_popupInterface);
return GetVListBoxComboPopup()->Append(item);
}
示例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 );
}
}
示例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 );
}
}
示例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);
}
示例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);
}
示例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();
}
}
示例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();
}
示例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 );
}
}