예제 #1
0
void* wxListBox::DoGetItemClientData(unsigned int n) const
{
    wxTreeEntry* entry = GTKGetEntry(n);
    wxCHECK_MSG(entry, NULL, wxT("could not get entry"));

    return wx_tree_entry_get_userdata(entry);
}
예제 #2
0
void wxListBox::DoSetItemClientData(unsigned int n, void* clientData)
{
    wxTreeEntry* entry = GTKGetEntry(n);
    wxCHECK_RET(entry, wxT("could not get entry"));

    wx_tree_entry_set_userdata(entry, clientData);
}
예제 #3
0
void wxListBox::DoSetItemClientData(unsigned int n, void* clientData)
{
    wxGtkObject<GtkTreeEntry> entry(GTKGetEntry(n));
    wxCHECK_RET(entry, wxT("could not get entry"));

    gtk_tree_entry_set_userdata( entry, clientData );
}
예제 #4
0
void* wxListBox::DoGetItemClientData(unsigned int n) const
{
    wxGtkObject<GtkTreeEntry> entry(GTKGetEntry(n));
    wxCHECK_MSG(entry, NULL, wxT("could not get entry"));

    return gtk_tree_entry_get_userdata( entry );
}
예제 #5
0
wxString wxListBox::GetString(unsigned int n) const
{
    wxCHECK_MSG( m_treeview != NULL, wxEmptyString, wxT("invalid listbox") );

    wxTreeEntry* entry = GTKGetEntry(n);
    wxCHECK_MSG( entry, wxEmptyString, wxT("wrong listbox index") );

    return wxGTK_CONV_BACK(wx_tree_entry_get_label(entry));
}
예제 #6
0
void wxListBox::DoSetItemClientData(unsigned int n, void* clientData)
{
    wxCHECK_RET( IsValid(n),
                 wxT("Invalid index passed to SetItemClientData") );

    GtkTreeEntry* entry = GTKGetEntry(n);
    wxCHECK_RET(entry, wxT("could not get entry"));

    gtk_tree_entry_set_userdata( entry, clientData );
    g_object_unref (entry);
}
예제 #7
0
void* wxListBox::DoGetItemClientData(unsigned int n) const
{
    wxCHECK_MSG( IsValid(n), NULL,
                 wxT("Invalid index passed to GetItemClientData") );

    GtkTreeEntry* entry = GTKGetEntry(n);
    wxCHECK_MSG(entry, NULL, wxT("could not get entry"));

    void* userdata = gtk_tree_entry_get_userdata( entry );
    g_object_unref (entry);
    return userdata;
}
예제 #8
0
void wxListBox::SetString(unsigned int n, const wxString& label)
{
    wxCHECK_RET( IsValid(n), wxT("invalid index in wxListBox::SetString") );
    wxCHECK_RET( m_treeview != NULL, wxT("invalid listbox") );

    GtkTreeEntry* entry = GTKGetEntry(n);
    wxCHECK_RET( entry, wxT("wrong listbox index") );

    // update the item itself
    gtk_tree_entry_set_label(entry, wxGTK_CONV(label));

    // and update the model which will refresh the tree too
    GtkTreeIter iter;
    wxCHECK_RET( GTKGetIteratorFor(n, &iter), wxT("failed to get iterator") );

    // FIXME: this resets the checked status of a wxCheckListBox item

    GTKSetItem(iter, entry);
}