X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/93cf77c076b699e8e0b3b0049bd4f80de15997dd..520e470fdd0daef09c77938db642e4583933c90d:/src/stubs/window.cpp diff --git a/src/stubs/window.cpp b/src/stubs/window.cpp index 341ad00e51..1d51541d8d 100644 --- a/src/stubs/window.cpp +++ b/src/stubs/window.cpp @@ -26,11 +26,12 @@ #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 @@ -74,12 +75,11 @@ wxWindow::wxWindow() 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 } @@ -90,7 +90,7 @@ wxWindow::~wxWindow() // 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) { @@ -157,7 +157,7 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id, m_autoLayout = FALSE; m_windowValidator = NULL; -#if USE_DRAG_AND_DROP +#if wxUSE_DRAG_AND_DROP m_pDropTarget = NULL; #endif @@ -184,10 +184,9 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id, 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; @@ -249,18 +248,19 @@ wxEvtHandler *wxWindow::PopEventHandler(bool deleteHandler) 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 @@ -523,7 +523,7 @@ int wxWindow::GetScrollThumb(int orient) const void wxWindow::SetScrollPos(int orient, int pos, bool refresh) { // TODO - return 0; + return; } // New function that will replace some of the above. @@ -537,7 +537,7 @@ void wxWindow::SetScrollbar(int orient, int pos, int thumbVisible, void wxWindow::ScrollWindow(int dx, int dy, const wxRectangle *rect) { // TODO - return 0; + return; } void wxWindow::SetFont(const wxFont& font) @@ -691,7 +691,7 @@ void wxWindow::MakeModal(bool modal) void wxWindow::OnCommand(wxWindow& win, wxCommandEvent& event) { if (GetEventHandler()->ProcessEvent(event) ) - return; + return; if (m_windowParent) m_windowParent->GetEventHandler()->OnCommand(win, event); } @@ -1181,6 +1181,11 @@ void wxWindow::SetValidator(const wxValidator& validator) 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) { @@ -1278,4 +1283,15 @@ bool wxWindow::IsExposed(const wxRect& rect) const return (m_updateRegion.Contains(rect) != wxOutRegion); } +/* + * Allocates control IDs + */ + +int wxWindow::NewControlId() +{ + static int s_controlId = 0; + s_controlId ++; + return s_controlId; +} +