(EventHandlerRef *)&m_macListCtrlEventHandler);
m_renameTimer = new wxListCtrlRenameTimer( this );
-
+
Connect( wxID_ANY, wxEVT_CHAR, wxCharEventHandler(wxListCtrl::OnChar), NULL, this );
Connect( wxID_ANY, wxEVT_LEFT_DOWN, wxMouseEventHandler(wxListCtrl::OnLeftDown), NULL, this );
Connect( wxID_ANY, wxEVT_LEFT_DCLICK, wxMouseEventHandler(wxListCtrl::OnDblClick), NULL, this );
void wxListCtrl::DoSetSize( int x, int y, int width, int height, int sizeFlags )
{
- wxControl::DoSetSize(x, y, width, height, sizeFlags);
+ wxListCtrlBase::DoSetSize(x, y, width, height, sizeFlags);
if (m_genericImpl)
m_genericImpl->SetSize(0, 0, width, height, sizeFlags);
}
}
-wxSize wxListCtrl::DoGetBestSize() const
-{
- return wxWindow::DoGetBestSize();
-}
-
bool wxListCtrl::SetFont(const wxFont& font)
{
- bool rv = true;
- rv = wxControl::SetFont(font);
+ bool rv = wxListCtrlBase::SetFont(font);
if (m_genericImpl)
rv = m_genericImpl->SetFont(font);
return rv;
{
if (m_genericImpl)
m_genericImpl->Freeze();
- wxControl::Freeze();
+ wxListCtrlBase::Freeze();
}
void wxListCtrl::Thaw ()
{
if (m_genericImpl)
m_genericImpl->Thaw();
- wxControl::Thaw();
+ wxListCtrlBase::Thaw();
}
void wxListCtrl::Update ()
{
if (m_genericImpl)
m_genericImpl->Update();
- wxControl::Update();
+ wxListCtrlBase::Update();
}
// ----------------------------------------------------------------------------
}
// Sets information about this column
-bool wxListCtrl::SetColumn(int col, wxListItem& item)
+bool wxListCtrl::SetColumn(int col, const wxListItem& item)
{
if (m_genericImpl)
return m_genericImpl->SetColumn(col, item);
if (item.GetMask() & wxLIST_MASK_TEXT)
{
wxFontEncoding enc;
- if ( m_font.Ok() )
+ if ( m_font.IsOk() )
enc = GetFont().GetEncoding();
else
enc = wxLocale::GetSystemEncoding();
}
// For list view mode (only), inserts a column.
-long wxListCtrl::InsertColumn(long col, wxListItem& item)
+long wxListCtrl::DoInsertColumn(long col, const wxListItem& item)
{
if (m_genericImpl)
return m_genericImpl->InsertColumn(col, item);
if (imageList && imageList->GetImageCount() > 0)
{
wxBitmap bmp = imageList->GetBitmap(0);
- //if (bmp.Ok())
+ //if (bmp.IsOk())
// type = kDataBrowserIconAndTextType;
}
return col;
}
-long wxListCtrl::InsertColumn(long col,
- const wxString& heading,
- int format,
- int width)
-{
- if (m_genericImpl)
- return m_genericImpl->InsertColumn(col, heading, format, width);
-
- wxListItem item;
- item.m_mask = wxLIST_MASK_TEXT | wxLIST_MASK_FORMAT;
- item.m_text = heading;
- if ( width > -1 )
- {
- item.m_mask |= wxLIST_MASK_WIDTH;
- item.m_width = width;
- }
- item.m_format = format;
-
- return InsertColumn(col, item);
-}
-
// scroll the control by the given number of pixels (exception: in list view,
// dx is interpreted as number of columns)
bool wxListCtrl::ScrollList(int dx, int dy)
return -1;
}
-wxListItemAttr *wxListCtrl::OnGetItemAttr(long WXUNUSED_UNLESS_DEBUG(item)) const
-{
- wxASSERT_MSG( item >= 0 && item < GetItemCount(),
- wxT("invalid item index in OnGetItemAttr()") );
-
- // no attributes by default
- return NULL;
-}
-
void wxListCtrl::SetItemCount(long count)
{
wxASSERT_MSG( IsVirtual(), wxT("this is for virtual controls only") );
static void calculateCGDrawingBounds(CGRect inItemRect, CGRect *outIconRect, CGRect *outTextRect, bool hasIcon = false)
{
float textBottom;
- float iconH, iconW = 0;
+ float iconW = 0;
float padding = kItemPadding;
if (hasIcon)
{
- iconH = kIconHeight;
iconW = kIconWidth;
padding = padding*2;
}
if (bgColor == wxNullColour)
bgColor = listBgColor;
- if (!font.Ok())
+ if (!font.IsOk())
font = list->GetFont();
wxCFStringRef cfString( text, wxLocale::GetSystemEncoding() );
else
{
- if (color.Ok())
+ if (color.IsOk())
color.GetRGBColor(&labelColor);
- else if (list->GetTextColour().Ok())
+ else if (list->GetTextColour().IsOk())
list->GetTextColour().GetRGBColor(&labelColor);
- if (bgColor.Ok())
+ if (bgColor.IsOk())
{
bgColor.GetRGBColor(&backgroundColor);
CGContextSaveGState(context);
{
info.version = kHIThemeTextInfoVersionOne;
info.fontID = kThemeViewsFont;
- if (font.Ok())
+ if (font.IsOk())
{
info.fontID = kThemeSpecifiedFont;
info.font = (CTFontRef) font.OSXGetCTFont();
info.version = kHIThemeTextInfoVersionZero;
info.fontID = kThemeViewsFont;
- if (font.Ok())
+ if (font.IsOk())
{
info.fontID = font.MacGetThemeFontID();