GTK: change wxBitmap to wxBitmapBundle in wxBitmapComboBox
This commit is contained in:
parent
d57bc78eea
commit
5e0591b297
@ -81,7 +81,7 @@ public:
|
||||
virtual ~wxBitmapComboBox();
|
||||
|
||||
// Sets the image for the given item.
|
||||
virtual void SetItemBitmap(unsigned int n, const wxBitmap& bitmap) wxOVERRIDE;
|
||||
virtual void SetItemBitmap(unsigned int n, const wxBitmapBundle& bitmap) wxOVERRIDE;
|
||||
|
||||
// Returns the image of the item with the given index.
|
||||
virtual wxBitmap GetItemBitmap(unsigned int n) const wxOVERRIDE;
|
||||
@ -93,16 +93,16 @@ public:
|
||||
}
|
||||
|
||||
// Adds item with image to the end of the combo box.
|
||||
int Append(const wxString& item, const wxBitmap& bitmap = wxNullBitmap);
|
||||
int Append(const wxString& item, const wxBitmap& bitmap, void *clientData);
|
||||
int Append(const wxString& item, const wxBitmap& bitmap, wxClientData *clientData);
|
||||
int Append(const wxString& item, const wxBitmapBundle& bitmap = wxBitmapBundle());
|
||||
int Append(const wxString& item, const wxBitmapBundle& bitmap, void *clientData);
|
||||
int Append(const wxString& item, const wxBitmapBundle& bitmap, wxClientData *clientData);
|
||||
|
||||
// Inserts item with image into the list before pos. Not valid for wxCB_SORT
|
||||
// styles, use Append instead.
|
||||
int Insert(const wxString& item, const wxBitmap& bitmap, unsigned int pos);
|
||||
int Insert(const wxString& item, const wxBitmap& bitmap,
|
||||
int Insert(const wxString& item, const wxBitmapBundle& bitmap, unsigned int pos);
|
||||
int Insert(const wxString& item, const wxBitmapBundle& bitmap,
|
||||
unsigned int pos, void *clientData);
|
||||
int Insert(const wxString& item, const wxBitmap& bitmap,
|
||||
int Insert(const wxString& item, const wxBitmapBundle& bitmap,
|
||||
unsigned int pos, wxClientData *clientData);
|
||||
|
||||
// Override some wxTextEntry interface.
|
||||
|
@ -182,14 +182,15 @@ wxSize wxBitmapComboBox::DoGetBestSize() const
|
||||
// Item manipulation
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void wxBitmapComboBox::SetItemBitmap(unsigned int n, const wxBitmap& bitmap)
|
||||
void wxBitmapComboBox::SetItemBitmap(unsigned int n, const wxBitmapBundle& bitmap)
|
||||
{
|
||||
if ( bitmap.IsOk() )
|
||||
wxBitmap bmp = bitmap.GetBitmapFor(this);
|
||||
if ( bmp.IsOk() )
|
||||
{
|
||||
if ( m_bitmapSize.x < 0 )
|
||||
{
|
||||
m_bitmapSize.x = bitmap.GetWidth();
|
||||
m_bitmapSize.y = bitmap.GetHeight();
|
||||
m_bitmapSize.x = bmp.GetLogicalWidth();
|
||||
m_bitmapSize.y = bmp.GetLogicalHeight();
|
||||
}
|
||||
|
||||
GtkComboBox* combobox = GTK_COMBO_BOX( m_widget );
|
||||
@ -199,7 +200,7 @@ void wxBitmapComboBox::SetItemBitmap(unsigned int n, const wxBitmap& bitmap)
|
||||
if ( gtk_tree_model_iter_nth_child( model, &iter, NULL, n ) )
|
||||
{
|
||||
wxGtkValue value0( G_TYPE_OBJECT );
|
||||
g_value_set_object( value0, bitmap.GetPixbuf() );
|
||||
g_value_set_object( value0, bmp.GetPixbuf() );
|
||||
gtk_list_store_set_value( GTK_LIST_STORE(model), &iter,
|
||||
m_bitmapCellIndex, value0 );
|
||||
}
|
||||
@ -230,7 +231,7 @@ wxBitmap wxBitmapComboBox::GetItemBitmap(unsigned int n) const
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
int wxBitmapComboBox::Append(const wxString& item, const wxBitmap& bitmap)
|
||||
int wxBitmapComboBox::Append(const wxString& item, const wxBitmapBundle& bitmap)
|
||||
{
|
||||
const int n = wxComboBox::Append(item);
|
||||
if ( n != wxNOT_FOUND )
|
||||
@ -238,7 +239,7 @@ int wxBitmapComboBox::Append(const wxString& item, const wxBitmap& bitmap)
|
||||
return n;
|
||||
}
|
||||
|
||||
int wxBitmapComboBox::Append(const wxString& item, const wxBitmap& bitmap,
|
||||
int wxBitmapComboBox::Append(const wxString& item, const wxBitmapBundle& bitmap,
|
||||
void *clientData)
|
||||
{
|
||||
const int n = wxComboBox::Append(item, clientData);
|
||||
@ -247,7 +248,7 @@ int wxBitmapComboBox::Append(const wxString& item, const wxBitmap& bitmap,
|
||||
return n;
|
||||
}
|
||||
|
||||
int wxBitmapComboBox::Append(const wxString& item, const wxBitmap& bitmap,
|
||||
int wxBitmapComboBox::Append(const wxString& item, const wxBitmapBundle& bitmap,
|
||||
wxClientData *clientData)
|
||||
{
|
||||
const int n = wxComboBox::Append(item, clientData);
|
||||
@ -257,7 +258,7 @@ int wxBitmapComboBox::Append(const wxString& item, const wxBitmap& bitmap,
|
||||
}
|
||||
|
||||
int wxBitmapComboBox::Insert(const wxString& item,
|
||||
const wxBitmap& bitmap,
|
||||
const wxBitmapBundle& bitmap,
|
||||
unsigned int pos)
|
||||
{
|
||||
const int n = wxComboBox::Insert(item, pos);
|
||||
@ -266,7 +267,7 @@ int wxBitmapComboBox::Insert(const wxString& item,
|
||||
return n;
|
||||
}
|
||||
|
||||
int wxBitmapComboBox::Insert(const wxString& item, const wxBitmap& bitmap,
|
||||
int wxBitmapComboBox::Insert(const wxString& item, const wxBitmapBundle& bitmap,
|
||||
unsigned int pos, wxClientData *clientData)
|
||||
{
|
||||
const int n = wxComboBox::Insert(item, pos, clientData);
|
||||
@ -275,7 +276,7 @@ int wxBitmapComboBox::Insert(const wxString& item, const wxBitmap& bitmap,
|
||||
return n;
|
||||
}
|
||||
|
||||
int wxBitmapComboBox::Insert(const wxString& item, const wxBitmap& bitmap,
|
||||
int wxBitmapComboBox::Insert(const wxString& item, const wxBitmapBundle& bitmap,
|
||||
unsigned int pos, void *clientData)
|
||||
{
|
||||
const int n = wxComboBox::Insert(item, pos, clientData);
|
||||
|
Loading…
Reference in New Issue
Block a user