#include "wx/button.h"
#include "wx/settings.h"
#include "wx/msgdlg.h"
+#include "wx/frame.h"
#include "wx/menuitem.h"
#include "wx/log.h"
-#if USE_DRAG_AND_DROP
+#if wxUSE_DRAG_AND_DROP
#include "wx/dnd.h"
#endif
m_caretWidth = 0; m_caretHeight = 0;
m_caretEnabled = FALSE;
m_caretShown = FALSE;
- m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW) ; ;
+ m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE) ;
+ // m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW) ; ;
m_foregroundColour = *wxBLACK;
- m_defaultForegroundColour = *wxBLACK ;
- m_defaultBackgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE) ;
-#if USE_DRAG_AND_DROP
+#if wxUSE_DRAG_AND_DROP
m_pDropTarget = NULL;
#endif
}
// Have to delete constraints/sizer FIRST otherwise
// sizers may try to look at deleted windows as they
// delete themselves.
-#if USE_CONSTRAINTS
+#if wxUSE_CONSTRAINTS
DeleteRelatedConstraints();
if (m_constraints)
{
m_autoLayout = FALSE;
m_windowValidator = NULL;
-#if USE_DRAG_AND_DROP
+#if wxUSE_DRAG_AND_DROP
m_pDropTarget = NULL;
#endif
else
m_windowId = id;
- m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW) ; ;
+ // m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW) ; ;
+ m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE) ;
m_foregroundColour = *wxBLACK;
- m_defaultForegroundColour = *wxBLACK ;
- m_defaultBackgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE) ;
m_windowStyle = style;
return NULL;
}
-#if USE_DRAG_AND_DROP
+#if wxUSE_DRAG_AND_DROP
void wxWindow::SetDropTarget(wxDropTarget *pDropTarget)
{
if ( m_pDropTarget != 0 ) {
- m_pDropTarget->Revoke(m_hWnd);
delete m_pDropTarget;
}
m_pDropTarget = pDropTarget;
if ( m_pDropTarget != 0 )
- m_pDropTarget->Register(m_hWnd);
+ {
+ // TODO
+ }
}
#endif
void wxWindow::SetScrollPos(int orient, int pos, bool refresh)
{
// TODO
- return 0;
+ return;
}
// New function that will replace some of the above.
void wxWindow::ScrollWindow(int dx, int dy, const wxRectangle *rect)
{
// TODO
- return 0;
+ return;
}
void wxWindow::SetFont(const wxFont& font)
void wxWindow::OnCommand(wxWindow& win, wxCommandEvent& event)
{
if (GetEventHandler()->ProcessEvent(event) )
- return;
+ return;
if (m_windowParent)
m_windowParent->GetEventHandler()->OnCommand(win, event);
}
m_windowValidator->SetWindow(this) ;
}
+void wxWindow::SetAcceleratorTable(const wxAcceleratorTable& accel)
+{
+ m_acceleratorTable = accel;
+}
+
// Find a window by id or name
wxWindow *wxWindow::FindWindow(long id)
{
return (m_updateRegion.Contains(rect) != wxOutRegion);
}
+/*
+ * Allocates control IDs
+ */
+
+int wxWindow::NewControlId()
+{
+ static int s_controlId = 0;
+ s_controlId ++;
+ return s_controlId;
+}
+