wxWidgets3: update to svn r70933

This commit is contained in:
Shawn Hoffman
2012-03-17 18:12:27 -07:00
parent 0ed8af2287
commit a648aca65c
906 changed files with 39468 additions and 17244 deletions

View File

@ -3,7 +3,7 @@
// Purpose: helper functions used with native BUTTON control
// Author: Vadim Zeitlin
// Created: 2008-06-07
// RCS-ID: $Id: button.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: button.h 68922 2011-08-27 14:11:28Z VZ $
// Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -44,7 +44,8 @@ void UpdateMultilineStyle(HWND hwnd, const wxString& label);
// flags for ComputeBestSize() and GetFittingSize()
enum
{
Size_AuthNeeded = 1
Size_AuthNeeded = 1,
Size_ExactFit = 2
};
// NB: All the functions below are implemented in src/msw/button.cpp

View File

@ -3,7 +3,7 @@
// Purpose: File system watcher impl classes
// Author: Bartosz Bekier
// Created: 2009-05-26
// RCS-ID: $Id: fswatcher.h 62678 2009-11-18 09:56:52Z VZ $
// RCS-ID: $Id: fswatcher.h 67806 2011-05-28 19:35:13Z VZ $
// Copyright: (c) 2009 Bartosz Bekier <bartosz.bekier@gmail.com>
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -50,7 +50,7 @@ public:
m_path);
}
}
delete m_overlapped;
free(m_overlapped);
}
bool IsOk() const
@ -104,7 +104,6 @@ private:
wxDECLARE_NO_COPY_CLASS(wxFSWatchEntryMSW);
};
// ============================================================================
// wxFSWatcherImplMSW helper classes implementations
// ============================================================================
@ -156,6 +155,48 @@ public:
return m_watches.insert(val).second;
}
// Removes a watch we're currently using. Notice that this doesn't happen
// immediately, CompleteRemoval() must be called later when it's really
// safe to delete the watch, i.e. after completion of the IO operation
// using it.
bool ScheduleForRemoval(const wxSharedPtr<wxFSWatchEntryMSW>& watch)
{
wxCHECK_MSG( m_iocp != INVALID_HANDLE_VALUE, false, "IOCP not init" );
wxCHECK_MSG( watch->IsOk(), false, "Invalid watch" );
const wxString path = watch->GetPath();
wxFSWatchEntries::iterator it = m_watches.find(path);
wxCHECK_MSG( it != m_watches.end(), false,
"Can't remove a watch we don't use" );
// We can't just delete the watch here as we can have pending events
// for it and if we destroyed it now, we could get a dangling (or,
// worse, reused to point to another object) pointer in ReadEvents() so
// just remember that this one should be removed when CompleteRemoval()
// is called later.
m_removedWatches.insert(wxFSWatchEntries::value_type(path, watch));
m_watches.erase(it);
return true;
}
// Really remove the watch previously passed to ScheduleForRemoval().
//
// It's ok to call this for a watch that hadn't been removed before, in
// this case we'll just return false and do nothing.
bool CompleteRemoval(wxFSWatchEntryMSW* watch)
{
wxFSWatchEntries::iterator it = m_removedWatches.find(watch->GetPath());
if ( it == m_removedWatches.end() )
return false;
// Removing the object from the map will result in deleting the watch
// itself as it's not referenced from anywhere else now.
m_removedWatches.erase(it);
return true;
}
// post completion packet
bool PostEmptyStatus()
{
@ -203,7 +244,13 @@ protected:
}
HANDLE m_iocp;
// The hash containing all the wxFSWatchEntryMSW objects currently being
// watched keyed by their paths.
wxFSWatchEntries m_watches;
// Contains the watches which had been removed but are still pending.
wxFSWatchEntries m_removedWatches;
};

View File

@ -0,0 +1,31 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/private/hiddenwin.h
// Purpose: Helper for creating a hidden window used by wxMSW internally.
// Author: Vadim Zeitlin
// Created: 2011-09-16
// RCS-ID: $Id: hiddenwin.h 69170 2011-09-21 15:07:32Z VZ $
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_PRIVATE_HIDDENWIN_H_
#define _WX_MSW_PRIVATE_HIDDENWIN_H_
#include "wx/msw/private.h"
/*
Creates a hidden window with supplied window proc registering the class for
it if necessary (i.e. the first time only). Caller is responsible for
destroying the window and unregistering the class (note that this must be
done because wxWidgets may be used as a DLL and so may be loaded/unloaded
multiple times into/from the same process so we can't rely on automatic
Windows class unregistration).
pclassname is a pointer to a caller stored classname, which must initially be
NULL. classname is the desired wndclass classname. If function successfully
registers the class, pclassname will be set to classname.
*/
extern "C" WXDLLIMPEXP_BASE HWND
wxCreateHiddenWindow(LPCTSTR *pclassname, LPCTSTR classname, WNDPROC wndproc);
#endif // _WX_MSW_PRIVATE_HIDDENWIN_H_

View File

@ -3,7 +3,7 @@
// Purpose: helper functions used with native message dialog
// Author: Rickard Westerlund
// Created: 2010-07-12
// RCS-ID: $Id: msgdlg.h 65348 2010-08-18 22:48:28Z VZ $
// RCS-ID: $Id: msgdlg.h 68537 2011-08-04 22:53:42Z VZ $
// Copyright: (c) 2010 wxWidgets team
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -30,8 +30,10 @@ namespace wxMSWMessageDialog
class wxMSWTaskDialogConfig
{
public:
enum { MAX_BUTTONS = 4 };
wxMSWTaskDialogConfig()
: buttons(new TASKDIALOG_BUTTON[3]),
: buttons(new TASKDIALOG_BUTTON[MAX_BUTTONS]),
parent(NULL),
iconId(0),
style(0),
@ -53,6 +55,7 @@ namespace wxMSWMessageDialog
wxString btnNoLabel;
wxString btnOKLabel;
wxString btnCancelLabel;
wxString btnHelpLabel;
// Will create a task dialog with it's paremeters for it's creation
// stored in the provided TASKDIALOGCONFIG parameter.

View File

@ -3,7 +3,7 @@
// Purpose: wxTimer class
// Author: Julian Smart
// Created: 01/02/97
// RCS-ID: $Id: timer.h 63486 2010-02-15 17:34:21Z RD $
// RCS-ID: $Id: timer.h 70165 2011-12-29 14:42:13Z SN $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -19,7 +19,7 @@
class WXDLLIMPEXP_BASE wxMSWTimerImpl : public wxTimerImpl
{
public:
wxMSWTimerImpl(wxTimer *timer) : wxTimerImpl(timer) { m_id = 0; };
wxMSWTimerImpl(wxTimer *timer) : wxTimerImpl(timer) { m_id = 0; }
virtual bool Start(int milliseconds = -1, bool oneShot = false);
virtual void Stop();