// Purpose: Implement some custom wxComboCtrls
// Author: Utensil Candel (UtensilCandel@@gmail.com)
// RCS-ID: $Id$
-// Licence: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx/wx.h".
// ----------------------------------------------------------------------------
-// wxPenStyleComboBox
+// PenStyleComboBox
// ----------------------------------------------------------------------------
-void wxPenStyleComboBox::OnDrawItem( wxDC& dc,
+void PenStyleComboBox::OnDrawItem( wxDC& dc,
const wxRect& rect,
int item,
int flags ) const
}
}
-void wxPenStyleComboBox::OnDrawBackground( wxDC& dc, const wxRect& rect,
+void PenStyleComboBox::OnDrawBackground( wxDC& dc, const wxRect& rect,
int item, int flags ) const
{
// If item is selected or even, or we are painting the
dc.DrawRectangle(rect);
}
-inline wxCoord wxPenStyleComboBox::OnMeasureItem( size_t item ) const
+inline wxCoord PenStyleComboBox::OnMeasureItem( size_t item ) const
{
// Simply demonstrate the ability to have variable-height items
if ( item & 1 )
return 24;
}
-inline wxCoord wxPenStyleComboBox::OnMeasureItemWidth( size_t WXUNUSED(item) ) const
+inline wxCoord PenStyleComboBox::OnMeasureItemWidth( size_t WXUNUSED(item) ) const
{
return -1; // default - will be measured from text width
}
-wxPenStyleComboBox * wxPenStyleComboBox::CreateSample(wxWindow* parent)
+PenStyleComboBox * PenStyleComboBox::CreateSample(wxWindow* parent)
{
- wxPenStyleComboBox* odc;
+ PenStyleComboBox* odc;
// Common list of items for all dialogs.
wxArrayString arrItems;
// When defining derivative class for callbacks, we need
// to use two-stage creation (or redefine the common wx
// constructor).
- odc = new wxPenStyleComboBox();
+ odc = new PenStyleComboBox();
odc->Create(parent,wxID_ANY,wxEmptyString,
wxDefaultPosition, wxDefaultSize,
arrItems,
odc->SetSelection(0);
// Load images from disk
- wxImage imgNormal(wxT("dropbutn.png"));
- wxImage imgPressed(wxT("dropbutp.png"));
- wxImage imgHover(wxT("dropbuth.png"));
+ wxImage imgNormal(wxT("bitmaps/dropbutn.png"));
+ wxImage imgPressed(wxT("bitmaps/dropbutp.png"));
+ wxImage imgHover(wxT("bitmaps/dropbuth.png"));
if ( imgNormal.IsOk() && imgPressed.IsOk() && imgHover.IsOk() )
{