// ----------------------------------------------------------------------------
void wxListBox::GtkInsertItems(const wxArrayString& items,
// ----------------------------------------------------------------------------
void wxListBox::GtkInsertItems(const wxArrayString& items,
wxASSERT_MSG(pos <= nCurCount, wxT("Invalid index passed to wxListBox"));
GtkTreeIter* pIter = NULL; // append by default
wxASSERT_MSG(pos <= nCurCount, wxT("Invalid index passed to wxListBox"));
GtkTreeIter* pIter = NULL; // append by default
GTK_TREE_MODEL(m_liststore),
&iter, NULL, //NULL = parent = get first
n
GTK_TREE_MODEL(m_liststore),
&iter, NULL, //NULL = parent = get first
n
{
// wxItemContainer already deletes data for us
wxListBox::DoSetItemClientData(n, (void*) clientData);
{
// wxItemContainer already deletes data for us
wxListBox::DoSetItemClientData(n, (void*) clientData);
{
wxCHECK_RET( IsValid(n), wxT("invalid index in wxListBox::SetString") );
wxCHECK_RET( m_treeview != NULL, wxT("invalid listbox") );
{
wxCHECK_RET( IsValid(n), wxT("invalid index in wxListBox::SetString") );
wxCHECK_RET( m_treeview != NULL, wxT("invalid listbox") );
wxCHECK_MSG( m_treeview != NULL, wxNOT_FOUND, wxT("invalid listbox") );
//Sort of hackish - maybe there is a faster way
wxCHECK_MSG( m_treeview != NULL, wxNOT_FOUND, wxT("invalid listbox") );
//Sort of hackish - maybe there is a faster way
// need to translate from master window since it is in client coords
gint binx, biny;
gdk_window_get_geometry(gtk_tree_view_get_bin_window(m_treeview),
// need to translate from master window since it is in client coords
gint binx, biny;
gdk_window_get_geometry(gtk_tree_view_get_bin_window(m_treeview),
gdk_window_set_background( window, m_backgroundColour.GetColor() );
gdk_window_clear( window );
}
gdk_window_set_background( window, m_backgroundColour.GetColor() );
gdk_window_clear( window );
}
wxString str(GetString(i));
GetTextExtent(str, &wLine, NULL);
lbWidth = wxMax(lbWidth, wLine);
wxString str(GetString(i));
GetTextExtent(str, &wLine, NULL);
lbWidth = wxMax(lbWidth, wLine);
- // don't make the listbox too tall (limit height to around 10 items) but don't
- // make it too small neither
+ // don't make the listbox too tall (limit height to around 10 items) but don't
+ // make it too small neither