Patch level :4.0 872
Files correlati : Ricompilazione Demo : [ ] Commento :aggiunti wxCheckVersion necessari per poter avere in contemporanea 4.0 e 10.0 git-svn-id: svn://10.65.10.50/trunk@16096 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
ba3c49c8ba
commit
a146a6fffd
@ -6,6 +6,8 @@
|
||||
|
||||
#if wxCHECK_VERSION(2,8,7)
|
||||
#include "wx/aui/aui.h"
|
||||
#else
|
||||
#include "wx/image.h"
|
||||
#endif
|
||||
|
||||
#include "wx/notebook.h"
|
||||
@ -1188,9 +1190,10 @@ protected:
|
||||
virtual void OnDrawItem(wxDC& dc, const wxRect& rect, size_t n) const;
|
||||
virtual wxCoord OnMeasureItem(size_t n) const;
|
||||
virtual void OnMouseMove(wxMouseEvent& e);
|
||||
#if wxCHECK_VERSION(2,8,7)
|
||||
virtual void OnMouseCaptureLost(wxMouseCaptureLostEvent& e);
|
||||
#endif
|
||||
virtual void OnSelected(wxCommandEvent& e);
|
||||
|
||||
public:
|
||||
int Add(short nIconId, const wxString strText, int nFlags);
|
||||
TwxOutlookBar(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size);
|
||||
@ -1558,7 +1561,11 @@ int TwxTreeCtrl::img2int(XVT_IMAGE xvt_img)
|
||||
for (int k = 0; k < il->GetImageCount(); k++)
|
||||
{
|
||||
wxImage old = il->GetBitmap(k).ConvertToImage();
|
||||
#if wxCHECK_VERSION(2,8,7)
|
||||
old.Rescale(img.GetWidth(), img.GetHeight(), wxIMAGE_QUALITY_HIGH);
|
||||
#else
|
||||
old.Rescale(img.GetWidth(), img.GetHeight());
|
||||
#endif
|
||||
nil->Add(old);
|
||||
}
|
||||
AssignImageList(il = nil);
|
||||
@ -1836,6 +1843,7 @@ BEGIN_EVENT_TABLE(TwxOutlookBar, wxVListBox)
|
||||
|
||||
END_EVENT_TABLE()
|
||||
|
||||
#if wxCHECK_VERSION(2,8,7)
|
||||
static wxAuiDockArt* GetArtist(const wxWindow* pWindow)
|
||||
{
|
||||
wxAuiDockArt* pArtist = NULL;
|
||||
@ -1844,6 +1852,7 @@ static wxAuiDockArt* GetArtist(const wxWindow* pWindow)
|
||||
pArtist = pManager->GetArtProvider();
|
||||
return pArtist;
|
||||
}
|
||||
#endif
|
||||
|
||||
static const wxColour ModulateColour(const wxColour& col, int percent)
|
||||
{
|
||||
@ -1893,11 +1902,14 @@ void TwxOutlookBar::OnDrawBackground(wxDC& dc, const wxRect& rect, size_t n) con
|
||||
color2 = DarkerColor(wxSystemSettings::GetColour(wxSYS_COLOUR_ACTIVECAPTION));
|
||||
}
|
||||
}
|
||||
#if wxCHECK_VERSION(2,8,7)
|
||||
dc.GradientFillLinear(rect, color1, color2, wxDOWN);
|
||||
#endif
|
||||
}
|
||||
|
||||
void TwxOutlookBar::OnDrawItem(wxDC& dc, const wxRect& rect, size_t n) const
|
||||
{
|
||||
#if wxCHECK_VERSION(2,8,7)
|
||||
const int nSide = rect.height;
|
||||
const TwxOutlookItem& oi = m_item[n];
|
||||
int nTextOffset = 4;
|
||||
@ -1921,6 +1933,7 @@ void TwxOutlookBar::OnDrawItem(wxDC& dc, const wxRect& rect, size_t n) const
|
||||
|
||||
const wxSize szText = dc.GetTextExtent(oi.m_strText);
|
||||
dc.DrawText(oi.m_strText, rect.x+nTextOffset, rect.y+(nSide-szText.y)/2);
|
||||
#endif
|
||||
}
|
||||
|
||||
wxCoord TwxOutlookBar::OnMeasureItem(size_t n) const
|
||||
@ -1937,6 +1950,7 @@ wxCoord TwxOutlookBar::OnMeasureItem(size_t n) const
|
||||
|
||||
void TwxOutlookBar::OnMouseMove(wxMouseEvent& evt)
|
||||
{
|
||||
#if wxCHECK_VERSION(2,8,7)
|
||||
int nHover = HitTest(evt.GetPosition());
|
||||
if (m_bCaptured && nHover != wxNOT_FOUND)
|
||||
{
|
||||
@ -1971,8 +1985,10 @@ void TwxOutlookBar::OnMouseMove(wxMouseEvent& evt)
|
||||
if (m_nHovering != wxNOT_FOUND)
|
||||
RefreshLine(m_nHovering);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if wxCHECK_VERSION(2,8,7)
|
||||
void TwxOutlookBar::OnMouseCaptureLost(wxMouseCaptureLostEvent&)
|
||||
{
|
||||
m_bCaptured = false;
|
||||
@ -1983,6 +1999,7 @@ void TwxOutlookBar::OnMouseCaptureLost(wxMouseCaptureLostEvent&)
|
||||
RefreshLine(nWasHovering);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void TwxOutlookBar::OnSelected(wxCommandEvent& evt)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user