class WXDLLIMPEXP_FWD_CORE wxGenericTreeItem;
-WX_DEFINE_EXPORTED_ARRAY_PTR(wxGenericTreeItem *, wxArrayGenericTreeItems);
+WX_DEFINE_ARRAY_PTR(wxGenericTreeItem *, wxArrayGenericTreeItems);
// ----------------------------------------------------------------------------
// constants
public:
wxTreeTextCtrl(wxGenericTreeCtrl *owner, wxGenericTreeItem *item);
- void EndEdit(bool discardChanges = false);
-
+ void EndEdit( bool discardChanges );
+
const wxGenericTreeItem* item() const { return m_itemEdited; }
protected:
void OnKillFocus( wxFocusEvent &event );
bool AcceptChanges();
- void Finish( bool setfocus = true );
+ void Finish( bool setfocus );
private:
wxGenericTreeCtrl *m_owner;
void wxTreeTextCtrl::EndEdit(bool discardChanges)
{
m_aboutToFinish = true;
-
+
if ( discardChanges )
{
m_owner->OnRenameCancelled(m_itemEdited);
-
- Finish();
+
+ Finish( true );
}
else
{
AcceptChanges();
// Even if vetoed, close the control (consistent with MSW)
- Finish();
+ Finish( true );
}
}
{
if ( !AcceptChanges() )
m_owner->OnRenameCancelled( m_itemEdited );
-
+
Finish( false );
}
(
wxSYS_COLOUR_HIGHLIGHT
),
- wxSOLID
+ wxBRUSHSTYLE_SOLID
);
m_hilightUnfocusedBrush = new wxBrush
(
wxSYS_COLOUR_BTNSHADOW
),
- wxSOLID
+ wxBRUSHSTYLE_SOLID
);
m_imageListButtons = NULL;
const wxString& name )
{
#ifdef __WXMAC__
- int major,minor;
- wxGetOsVersion( &major, &minor );
+ int major, minor;
+ wxGetOsVersion(&major, &minor);
- style &= ~wxTR_LINES_AT_ROOT;
- style |= wxTR_NO_LINES;
if (major < 10)
style |= wxTR_ROW_LINES;
-
- if (style == 0 || style & wxTR_DEFAULT_STYLE)
- style |= wxTR_FULL_ROW_HIGHLIGHT;
-
#endif // __WXMAC__
-#ifdef __WXGTK20__
- style |= wxTR_NO_LINES;
-#endif
if ( !wxControl::Create( parent, id, pos, size,
style|wxHSCROLL|wxVSCROLL,
// style because we apparently get performance problems when using dotted
// pen for drawing in some ports -- but under MSW it seems to work fine
#ifdef __WXMSW__
- m_dottedPen = wxPen(*wxLIGHT_GREY, 0, wxDOT);
+ m_dottedPen = wxPen(*wxLIGHT_GREY, 0, wxPENSTYLE_DOT);
#else
m_dottedPen = *wxGREY_PEN;
#endif
{
wxGenericTreeItem *item = (wxGenericTreeItem*) itemId.m_pItem;
wxCHECK_RET( item, wxT("SelectItem(): invalid tree item") );
-
+
wxTreeEvent event(wxEVT_COMMAND_TREE_SEL_CHANGING, this, item);
if ( GetEventHandler()->ProcessEvent( event ) && !event.IsAllowed() )
return;
{
colBg = GetBackgroundColour();
}
- dc.SetBrush(wxBrush(colBg, wxSOLID));
+ dc.SetBrush(wxBrush(colBg, wxBRUSHSTYLE_SOLID));
}
int offset = HasFlag(wxTR_ROW_LINES) ? 1 : 0;
#else
rect.x -= 1;
rect.width += 2;
-
+
int flags = wxCONTROL_SELECTED;
if (m_hasFocus)
flags |= wxCONTROL_FOCUSED;
{
rect.x -= 1;
rect.width += 2;
-
+
int flags = wxCONTROL_SELECTED;
if (m_hasFocus)
flags |= wxCONTROL_FOCUSED;
dc.DestroyClippingRegion();
}
- dc.SetBackgroundMode(wxTRANSPARENT);
+ dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
int extraH = (total_h > text_h) ? (total_h - text_h)/2 : 0;
dc.DrawText( item->GetText(),
(wxCoord)(image_w + item->GetX()),
void wxGenericTreeCtrl::DoThaw()
{
+ wxTreeCtrlBase::DoThaw();
+
if ( m_dirty )
DoDirtyProcessing();
else