#include "wx/log.h"
#include "wx/msgdlg.h"
#include "wx/icon.h"
+ #include "wx/image.h"
#endif
#include "wx/apptrait.h"
renderer.DrawTreeItemButton(this, dc,
wxRect(x2, y, 20, 20), m_flags);
y += lineHeight + 20;
+
+#ifdef wxHAS_DRAW_TITLE_BAR_BITMAP
+ dc.DrawText("DrawTitleBarBitmap()", x1, y);
+ wxRect rBtn(x2, y, 21, 21);
+ renderer.DrawTitleBarBitmap(this, dc, rBtn,
+ wxTITLEBAR_BUTTON_HELP, m_flags);
+ rBtn.x += 2*rBtn.width;
+ renderer.DrawTitleBarBitmap(this, dc, rBtn,
+ wxTITLEBAR_BUTTON_ICONIZE, m_flags);
+ rBtn.x += 2*rBtn.width;
+ renderer.DrawTitleBarBitmap(this, dc, rBtn,
+ wxTITLEBAR_BUTTON_RESTORE, m_flags);
+ rBtn.x += 2*rBtn.width;
+ renderer.DrawTitleBarBitmap(this, dc, rBtn,
+ wxTITLEBAR_BUTTON_MAXIMIZE, m_flags);
+ rBtn.x += 2*rBtn.width;
+ renderer.DrawTitleBarBitmap(this, dc, rBtn,
+ wxTITLEBAR_BUTTON_CLOSE, m_flags);
+
+ y += lineHeight + rBtn.height;
+#endif // wxHAS_DRAW_TITLE_BAR_BITMAP
}
int m_flags;
if ( !wxApp::OnInit() )
return false;
+#ifdef __WXOSX__
+ // currently the images used by DrawTitleBarBitmap() are hard coded as PNG
+ // images inside the library itself so we need to enable PNG support to use
+ // this function
+ wxImage::AddHandler(new wxPNGHandler);
+#endif // OS X
+
// create the main application window
new MyFrame;