#endif // wxUSE_METAFILES
#if defined(__WXGTK__) || defined(__WXX11__) || defined(__WXMOTIF__) || defined(__WXMAC__)
- #include "mondrian.xpm"
+ #include "../sample.xpm"
#if wxUSE_DRAG_AND_DROP
#include "dnd_copy.xpm"
#include "dnd_move.xpm"
struct ShapeDump
{
- int x, y, // position
- w, h, // size
- r, g, b, // colour
- k; // kind
+ wxCoord x, y, // position
+ w, h; // size
+ int k; // kind
+ unsigned char r, g, b; // colour
};
wxPoint m_pos;
// override base class (pure) virtuals
virtual wxDragResult OnEnter(wxCoord x, wxCoord y, wxDragResult def)
- {
+ {
#if wxUSE_STATUSBAR
- m_frame->SetStatusText(_T("Mouse entered the frame"));
+ m_frame->SetStatusText(_T("Mouse entered the frame"));
#endif // wxUSE_STATUSBAR
- return OnDragOver(x, y, def);
+ return OnDragOver(x, y, def);
}
virtual void OnLeave()
- {
+ {
#if wxUSE_STATUSBAR
- m_frame->SetStatusText(_T("Mouse left the frame"));
+ m_frame->SetStatusText(_T("Mouse left the frame"));
#endif // wxUSE_STATUSBAR
}
virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def)
{
// frame icon and status bar
- SetIcon(wxICON(mondrian));
+ SetIcon(wxICON(sample));
#if wxUSE_STATUSBAR
CreateStatusBar();
#endif // wxUSE_LOG
#endif // wxUSE_DRAG_AND_DROP
- wxBoxSizer *m_sizer_top = new wxBoxSizer( wxHORIZONTAL );
- m_sizer_top->Add(m_ctrlFile, 1, wxEXPAND );
- m_sizer_top->Add(m_ctrlText, 1, wxEXPAND );
+ wxBoxSizer *sizer_top = new wxBoxSizer( wxHORIZONTAL );
+ sizer_top->Add(m_ctrlFile, 1, wxEXPAND );
+ sizer_top->Add(m_ctrlText, 1, wxEXPAND );
- wxBoxSizer *m_sizer = new wxBoxSizer( wxVERTICAL );
- m_sizer->Add(m_sizer_top, 1, wxEXPAND );
+ wxBoxSizer *sizer = new wxBoxSizer( wxVERTICAL );
+ sizer->Add(sizer_top, 1, wxEXPAND );
#if wxUSE_LOG
- m_sizer->Add(m_ctrlLog, 1, wxEXPAND);
+ sizer->Add(m_ctrlLog, 2, wxEXPAND);
+ sizer->SetItemMinSize(m_ctrlLog, 450, 0);
#endif // wxUSE_LOG
- m_sizer->Add(0,50);
+ sizer->AddSpacer(50);
- SetSizer( m_sizer );
- m_sizer->SetSizeHints( this );
+ SetSizer(sizer);
+ sizer->SetSizeHints( this );
// copy data by default but allow moving it as well
m_moveByDefault = false;
data.SetChooseFull(true);
for (int i = 0; i < 16; i++)
{
- wxColour colour(i*16, i*16, i*16);
+ wxColour colour((unsigned char)(i*16), (unsigned char)(i*16), (unsigned char)(i*16));
data.SetCustomColour(i, colour);
}