+ if (m_lineHeight < 30)
+ m_lineHeight += 2; // at least 2 pixels
+ else
+ m_lineHeight += m_lineHeight/10; // otherwise 10% extra spacing
+}
+
+void wxGenericTreeCtrl::SetImageList(wxImageList *imageList)
+{
+ if (m_ownsImageListNormal) delete m_imageListNormal;
+ m_imageListNormal = imageList;
+ m_ownsImageListNormal = FALSE;
+ m_dirty = TRUE;
+ // Don't do any drawing if we're setting the list to NULL,
+ // since we may be in the process of deleting the tree control.
+ if (imageList)
+ CalculateLineHeight();
+}
+
+void wxGenericTreeCtrl::SetStateImageList(wxImageList *imageList)
+{
+ if (m_ownsImageListState) delete m_imageListState;
+ m_imageListState = imageList;
+ m_ownsImageListState = FALSE;
+}
+
+void wxGenericTreeCtrl::SetButtonsImageList(wxImageList *imageList)
+{
+ if (m_ownsImageListButtons) delete m_imageListButtons;
+ m_imageListButtons = imageList;
+ m_ownsImageListButtons = FALSE;
+ m_dirty = TRUE;
+ CalculateLineHeight();
+}
+
+void wxGenericTreeCtrl::AssignImageList(wxImageList *imageList)
+{
+ SetImageList(imageList);
+ m_ownsImageListNormal = TRUE;
+}
+
+void wxGenericTreeCtrl::AssignStateImageList(wxImageList *imageList)
+{
+ SetStateImageList(imageList);
+ m_ownsImageListState = TRUE;