X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9151dcec4f51cf7e9c160ede683cc63392459fea..43563ef2dde83b94a798be1788adcd256897c8bd:/src/cocoa/window.mm?ds=sidebyside diff --git a/src/cocoa/window.mm b/src/cocoa/window.mm index 69168f11c4..31fc7b3dad 100644 --- a/src/cocoa/window.mm +++ b/src/cocoa/window.mm @@ -4,9 +4,9 @@ // Author: David Elliott // Modified by: // Created: 2002/12/26 -// RCS-ID: $Id: +// RCS-ID: $Id$ // Copyright: (c) 2002 David Elliott -// Licence: wxWidgets licence +// Licence: wxWidgets licence ///////////////////////////////////////////////////////////////////////////// #include "wx/wxprec.h" @@ -308,8 +308,8 @@ void wxWindowCocoa::Init() m_cocoaNSView = NULL; m_cocoaHider = NULL; m_wxCocoaScrollView = NULL; - m_isBeingDeleted = FALSE; - m_isInPaint = FALSE; + m_isBeingDeleted = false; + m_isInPaint = false; m_shouldBeEnabled = true; } @@ -335,7 +335,7 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID winid, SetInitialFrameRect(pos,size); } - return TRUE; + return true; } // Destructor @@ -439,7 +439,7 @@ bool wxWindowCocoa::Cocoa_drawRect(const NSRect &rect) wxLogDebug(wxT("Paint event recursion!")); return false; } - m_isInPaint = TRUE; + m_isInPaint = true; // Set m_updateRegion const NSRect *rects = ▭ // The bounding box of the region @@ -459,7 +459,7 @@ bool wxWindowCocoa::Cocoa_drawRect(const NSRect &rect) wxPaintEvent event(m_windowId); event.SetEventObject(this); bool ret = GetEventHandler()->ProcessEvent(event); - m_isInPaint = FALSE; + m_isInPaint = false; return ret; } @@ -580,9 +580,9 @@ bool wxWindowCocoa::Cocoa_resetCursorRects() { if(!m_cursor.GetNSCursor()) return false; - - [GetNSView() addCursorRect: [GetNSView() visibleRect] cursor: m_cursor.GetNSCursor()]; - + + [GetNSView() addCursorRect: [GetNSView() visibleRect] cursor: m_cursor.GetNSCursor()]; + return true; } @@ -679,7 +679,7 @@ void wxWindowCocoa::DoSetSize(int x, int y, int width, int height, int sizeFlags AdjustForParentClientOrigin(x,y,sizeFlags); - wxSize size(-1,-1); + wxSize size(wxDefaultSize); if((width==-1)&&!(sizeFlags&wxSIZE_ALLOW_MINUS_ONE)) { @@ -849,7 +849,18 @@ void wxWindow::DoSetClientSize(int width, int height) void wxWindow::CocoaSetWxWindowSize(int width, int height) { - wxWindowCocoa::DoSetSize(-1,-1,width,height,wxSIZE_USE_EXISTING); + wxWindowCocoa::DoSetSize(wxDefaultCoord,wxDefaultCoord,width,height,wxSIZE_USE_EXISTING); +} + +void wxWindow::SetLabel(const wxString& WXUNUSED(label)) +{ + // TODO +} + +wxString wxWindow::GetLabel() const +{ + // TODO + return wxEmptyString; } int wxWindow::GetCharHeight() const @@ -933,7 +944,7 @@ void wxWindow::DoSetVirtualSize( int x, int y ) bool wxWindow::SetFont(const wxFont& font) { // TODO - return TRUE; + return true; } static int CocoaRaiseWindowCompareFunction(id first, id second, void *target) @@ -979,7 +990,7 @@ void wxWindow::Lower() bool wxWindow::DoPopupMenu(wxMenu *menu, int x, int y) { - return FALSE; + return false; } // Get the window with the focus @@ -1034,4 +1045,3 @@ wxWindow* wxFindWindowAtPointer(wxPoint& pt) pt = wxGetMousePosition(); return NULL; } -