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

@ -0,0 +1,81 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/anybutton.h
// Purpose: wxAnyButton class
// Author: Julian Smart
// Created: 1997-02-01 (extracted from button.h)
// RCS-ID: $Id: anybutton.h 67931 2011-06-14 13:00:42Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_ANYBUTTON_H_
#define _WX_MSW_ANYBUTTON_H_
// ----------------------------------------------------------------------------
// Common button functionality
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxAnyButton : public wxAnyButtonBase
{
public:
wxAnyButton()
{
m_imageData = NULL;
#if wxUSE_MARKUP
m_markupText = NULL;
#endif // wxUSE_MARKUP
}
virtual ~wxAnyButton();
// overridden base class methods
virtual void SetLabel(const wxString& label);
virtual bool SetBackgroundColour(const wxColour &colour);
virtual bool SetForegroundColour(const wxColour &colour);
// implementation from now on
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
virtual State GetNormalState() const { return State_Normal; }
// returns true if the platform should explicitly apply a theme border
virtual bool CanApplyThemeBorder() const { return false; }
protected:
// usually overridden base class virtuals
virtual wxSize DoGetBestSize() const;
virtual wxBitmap DoGetBitmap(State which) const;
virtual void DoSetBitmap(const wxBitmap& bitmap, State which);
virtual wxSize DoGetBitmapMargins() const;
virtual void DoSetBitmapMargins(wxCoord x, wxCoord y);
virtual void DoSetBitmapPosition(wxDirection dir);
#if wxUSE_MARKUP
virtual bool DoSetLabelMarkup(const wxString& markup);
#endif // wxUSE_MARKUP
// Increases the passed in size to account for the button image.
//
// Should only be called if we do have a button, i.e. if m_imageData is
// non-NULL.
void AdjustForBitmapSize(wxSize& size) const;
class wxButtonImageData *m_imageData;
#if wxUSE_MARKUP
class wxMarkupText *m_markupText;
#endif // wxUSE_MARKUP
// Switches button into owner-drawn mode: this is used if we need to draw
// something not supported by the native control, such as using non default
// colours or a bitmap on pre-XP systems.
void MakeOwnerDrawn();
bool IsOwnerDrawn() const;
private:
wxDECLARE_NO_COPY_CLASS(wxAnyButton);
};
#endif // _WX_MSW_ANYBUTTON_H_

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id: bmpbuttn.h 61071 2009-06-15 23:10:16Z VZ $
// RCS-ID: $Id: bmpbuttn.h 67931 2011-06-14 13:00:42Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -19,7 +19,7 @@
class WXDLLIMPEXP_CORE wxBitmapButton : public wxBitmapButtonBase
{
public:
wxBitmapButton() { Init(); }
wxBitmapButton() {}
wxBitmapButton(wxWindow *parent,
wxWindowID id,
@ -30,8 +30,6 @@ public:
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr)
{
Init();
Create(parent, id, bitmap, pos, size, style, validator, name);
}
@ -45,25 +43,6 @@ public:
const wxString& name = wxButtonNameStr);
protected:
// common part of all ctors
void Init()
{
m_disabledSetByUser =
m_hoverSetByUser = false;
}
// reimplement some base class virtuals
virtual void DoSetBitmap(const wxBitmap& bitmap, State which);
// true if disabled bitmap was set by user, false if we created it
// ourselves from the normal one
bool m_disabledSetByUser;
// true if hover bitmap was set by user, false if it was set from focused
// one
bool m_hoverSetByUser;
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS_NO_COPY(wxBitmapButton)
};

View File

@ -4,13 +4,13 @@
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id: button.h 67065 2011-02-27 12:48:26Z VZ $
// RCS-ID: $Id: button.h 69984 2011-12-11 17:03:56Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_BUTTON_H_
#define _WX_BUTTON_H_
#ifndef _WX_MSW_BUTTON_H_
#define _WX_MSW_BUTTON_H_
// ----------------------------------------------------------------------------
// Pushbutton
@ -47,22 +47,13 @@ public:
virtual wxWindow *SetDefault();
// overridden base class methods
virtual void SetLabel(const wxString& label);
virtual bool SetBackgroundColour(const wxColour &colour);
virtual bool SetForegroundColour(const wxColour &colour);
// implementation from now on
virtual void Command(wxCommandEvent& event);
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
virtual bool MSWCommand(WXUINT param, WXWORD id);
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
// returns true if the platform should explicitly apply a theme border
virtual bool CanApplyThemeBorder() const { return false; }
protected:
// send a notification event, return true if processed
bool SendClickEvent();
@ -74,32 +65,8 @@ protected:
// set or unset BS_DEFPUSHBUTTON style
static void SetDefaultStyle(wxButton *btn, bool on);
// usually overridden base class virtuals
virtual wxSize DoGetBestSize() const;
virtual bool DoGetAuthNeeded() const;
virtual void DoSetAuthNeeded(bool show);
virtual wxBitmap DoGetBitmap(State which) const;
virtual void DoSetBitmap(const wxBitmap& bitmap, State which);
virtual wxSize DoGetBitmapMargins() const;
virtual void DoSetBitmapMargins(wxCoord x, wxCoord y);
virtual void DoSetBitmapPosition(wxDirection dir);
#if wxUSE_MARKUP
virtual bool DoSetLabelMarkup(const wxString& markup);
#endif // wxUSE_MARKUP
// Increases the passed in size to account for the button image.
//
// Should only be called if we do have a button, i.e. if m_imageData is
// non-NULL.
void AdjustForBitmapSize(wxSize& size) const;
class wxButtonImageData *m_imageData;
#if wxUSE_MARKUP
class wxMarkupText *m_markupText;
#endif // wxUSE_MARKUP
// true if the UAC symbol is shown
bool m_authNeeded;
@ -107,19 +74,13 @@ protected:
private:
void Init()
{
m_imageData = NULL;
#if wxUSE_MARKUP
m_markupText = NULL;
#endif // wxUSE_MARKUP
m_authNeeded = false;
}
// Switches button into owner-drawn mode: this is used if we need to draw
// something not supported by the native control, such as using non default
// colours or a bitmap on pre-XP systems.
void MakeOwnerDrawn();
void OnCharHook(wxKeyEvent& event);
wxDECLARE_EVENT_TABLE();
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxButton);
};
#endif // _WX_BUTTON_H_
#endif // _WX_MSW_BUTTON_H_

View File

@ -4,7 +4,7 @@
* Author: Julian Smart
* Modified by:
* Created: 01/02/97
* RCS-ID: $Id: chkconf.h 63832 2010-04-02 19:30:41Z VZ $
* RCS-ID: $Id: chkconf.h 69845 2011-11-27 19:52:13Z VZ $
* Copyright: (c) Julian Smart
* Licence: wxWindows licence
*/
@ -224,11 +224,6 @@
*/
#ifdef __WIN64__
# if wxUSE_STACKWALKER
/* this is not currently supported under Win64, volunteers needed to
make it work */
# undef wxUSE_STACKWALKER
# define wxUSE_STACKWALKER 0
# undef wxUSE_CRASHREPORT
# define wxUSE_CRASHREPORT 0
# endif
@ -239,7 +234,7 @@
Compiler-specific checks.
*/
// Borland
/* Borland */
#ifdef __BORLANDC__
#if __BORLANDC__ < 0x500
@ -336,6 +331,14 @@
#endif /* !wxUSE_DYNAMIC_LOADER */
#if !wxUSE_DYNLIB_CLASS
# if wxUSE_DC_TRANSFORM_MATRIX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_DC_TRANSFORM_MATRIX requires wxUSE_DYNLIB_CLASS"
# else
# undef wxUSE_DC_TRANSFORM_MATRIX
# define wxUSE_DC_TRANSFORM_MATRIX 0
# endif
# endif
# if wxUSE_UXTHEME
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_UXTHEME requires wxUSE_DYNLIB_CLASS"
@ -400,6 +403,14 @@
# define wxUSE_MEDIACTRL 0
# endif
# endif
# if wxUSE_WEB
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxWebView requires wxActiveXContainer under MSW"
# else
# undef wxUSE_WEB
# define wxUSE_WEB 0
# endif
# endif
#endif /* !wxUSE_ACTIVEX */
#if !wxUSE_THREADS
@ -413,6 +424,18 @@
# endif
#endif /* !wxUSE_THREADS */
#if !wxUSE_OLE_AUTOMATION
# if wxUSE_WEB
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxWebView requires wxUSE_OLE_AUTOMATION under MSW"
# else
# undef wxUSE_WEB
# define wxUSE_WEB 0
# endif
# endif
#endif /* !wxUSE_OLE_AUTOMATION */
#if defined(__WXUNIVERSAL__) && wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW && !wxUSE_POSTSCRIPT
# undef wxUSE_POSTSCRIPT
# define wxUSE_POSTSCRIPT 1

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id: combobox.h 63242 2010-01-24 01:00:45Z VZ $
// RCS-ID: $Id: combobox.h 68808 2011-08-21 12:06:16Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -75,6 +75,10 @@ public:
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr);
// See wxComboBoxBase discussion of IsEmpty().
bool IsListEmpty() const { return wxItemContainer::IsEmpty(); }
bool IsTextEmpty() const { return wxTextEntry::IsEmpty(); }
// resolve ambiguities among virtual functions inherited from both base
// classes
virtual void Clear();

View File

@ -0,0 +1,58 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/custombgwin.h
// Purpose: wxMSW implementation of wxCustomBackgroundWindow
// Author: Vadim Zeitlin
// Created: 2011-10-10
// RCS-ID: $Id: custombgwin.h 69378 2011-10-11 17:07:43Z VZ $
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_CUSTOMBGWIN_H_
#define _WX_MSW_CUSTOMBGWIN_H_
#include "wx/bitmap.h"
#include "wx/brush.h"
// ----------------------------------------------------------------------------
// wxCustomBackgroundWindow
// ----------------------------------------------------------------------------
template <class W>
class wxCustomBackgroundWindow : public W,
public wxCustomBackgroundWindowBase
{
public:
typedef W BaseWindowClass;
wxCustomBackgroundWindow() { m_backgroundBrush = NULL; }
virtual ~wxCustomBackgroundWindow() { delete m_backgroundBrush; }
protected:
virtual void DoSetBackgroundBitmap(const wxBitmap& bmp)
{
delete m_backgroundBrush;
m_backgroundBrush = bmp.IsOk() ? new wxBrush(bmp) : NULL;
// Our transparent children should use our background if we have it,
// otherwise try to restore m_inheritBgCol to some reasonable value: true
// if we also have non-default background colour or false otherwise.
BaseWindowClass::m_inheritBgCol = bmp.IsOk()
|| BaseWindowClass::UseBgCol();
}
virtual WXHBRUSH MSWGetCustomBgBrush()
{
if ( m_backgroundBrush )
return (WXHBRUSH)m_backgroundBrush->GetResourceHandle();
return BaseWindowClass::MSWGetCustomBgBrush();
}
wxBrush *m_backgroundBrush;
wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxCustomBackgroundWindow, W);
};
#endif // _WX_MSW_CUSTOMBGWIN_H_

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 2005-01-09
// RCS-ID: $Id: datectrl.h 49893 2007-11-13 12:10:34Z JS $
// RCS-ID: $Id: datectrl.h 69222 2011-09-29 13:43:02Z VZ $
// Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwindows.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -43,30 +43,21 @@ public:
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxDatePickerCtrlNameStr);
// set/get the date
// Override this one to add date-specific (and time-ignoring) checks.
virtual void SetValue(const wxDateTime& dt);
virtual wxDateTime GetValue() const;
// set/get the allowed valid range for the dates, if either/both of them
// are invalid, there is no corresponding limit and if neither is set
// GetRange() returns false
// Implement the base class pure virtuals.
virtual void SetRange(const wxDateTime& dt1, const wxDateTime& dt2);
virtual bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const;
// Override MSW-specific functions used during control creation.
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
// returns true if the platform should explicitly apply a theme border
virtual bool CanApplyThemeBorder() const { return false; }
protected:
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
virtual wxSize DoGetBestSize() const;
// the date currently shown by the control, may be invalid
wxDateTime m_date;
virtual wxLocaleInfo MSWGetFormat() const;
virtual bool MSWAllowsNone() const { return HasFlag(wxDP_ALLOWNONE); }
virtual bool MSWOnDateTimeChange(const tagNMDATETIMECHANGE& dtch);
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDatePickerCtrl)
};

View File

@ -0,0 +1,87 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/datetimectrl.h
// Purpose: wxDateTimePickerCtrl for Windows.
// Author: Vadim Zeitlin
// Created: 2011-09-22 (extracted from wx/msw/datectrl.h).
// RCS-ID: $Id: datetimectrl.h 69489 2011-10-20 16:45:48Z VZ $
// Copyright: (c) 2005-2011 Vadim Zeitlin <vadim@wxwindows.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_DATETIMECTRL_H_
#define _WX_MSW_DATETIMECTRL_H_
#include "wx/intl.h"
// Forward declare a struct from Platform SDK.
struct tagNMDATETIMECHANGE;
// ----------------------------------------------------------------------------
// wxDateTimePickerCtrl
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_ADV wxDateTimePickerCtrl : public wxDateTimePickerCtrlBase
{
public:
// set/get the date
virtual void SetValue(const wxDateTime& dt);
virtual wxDateTime GetValue() const;
// returns true if the platform should explicitly apply a theme border
virtual bool CanApplyThemeBorder() const { return false; }
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
protected:
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
virtual wxSize DoGetBestSize() const;
// Helper for the derived classes Create(): creates a native control with
// the specified attributes.
bool MSWCreateDateTimePicker(wxWindow *parent,
wxWindowID id,
const wxDateTime& dt,
const wxPoint& pos,
const wxSize& size,
long style,
const wxValidator& validator,
const wxString& name);
// Notice that the methods below must be overridden in all native MSW
// classes inheriting from this one but they can't be pure virtual because
// the generic implementations, not needing nor able to implement them, is
// also derived from this class currently. The real problem is, of course,
// this wrong class structure because the generic classes also inherit the
// wrong implementations of Set/GetValue() and DoGetBestSize() but as they
// override these methods anyhow, it does work -- but is definitely ugly
// and need to be changed (but how?) in the future.
// Override to return the date/time format used by this control.
virtual wxLocaleInfo MSWGetFormat() const /* = 0 */
{
wxFAIL_MSG( "Unreachable" );
return wxLOCALE_TIME_FMT;
}
// Override to indicate whether we can have no date at all.
virtual bool MSWAllowsNone() const /* = 0 */
{
wxFAIL_MSG( "Unreachable" );
return false;
}
// Override to update m_date and send the event when the control contents
// changes, return true if the event was handled.
virtual bool MSWOnDateTimeChange(const tagNMDATETIMECHANGE& dtch) /* = 0 */
{
wxUnusedVar(dtch);
wxFAIL_MSG( "Unreachable" );
return false;
}
// the date currently shown by the control, may be invalid
wxDateTime m_date;
};
#endif // _WX_MSW_DATETIMECTRL_H_

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id: dc.h 67063 2011-02-27 12:48:13Z VZ $
// RCS-ID: $Id: dc.h 67588 2011-04-23 16:03:10Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -87,6 +87,13 @@ public:
virtual void SetDeviceOrigin(wxCoord x, wxCoord y);
virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
#if wxUSE_DC_TRANSFORM_MATRIX
virtual bool CanUseTransformMatrix() const;
virtual bool SetTransformMatrix(const wxAffineMatrix2D& matrix);
virtual wxAffineMatrix2D GetTransformMatrix() const;
virtual void ResetTransformMatrix();
#endif // wxUSE_DC_TRANSFORM_MATRIX
virtual void SetLogicalFunction(wxRasterOperationMode function);
// implementation from now on

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 2005-01-08 (extracted from msw/crashrpt.cpp)
// RCS-ID: $Id: debughlp.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: debughlp.h 69845 2011-11-27 19:52:13Z VZ $
// Copyright: (c) 2003-2005 Vadim Zeitlin <vadim@wxwindows.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -146,9 +146,9 @@ public:
PGET_MODULE_BASE_ROUTINE,
PTRANSLATE_ADDRESS_ROUTINE);
typedef BOOL (WINAPI *SymFromAddr_t)(HANDLE, DWORD64, PDWORD64, PSYMBOL_INFO);
typedef LPVOID (WINAPI *SymFunctionTableAccess_t)(HANDLE, DWORD);
typedef DWORD (WINAPI *SymGetModuleBase_t)(HANDLE, DWORD);
typedef BOOL (WINAPI *SymGetLineFromAddr_t)(HANDLE, DWORD,
typedef LPVOID (WINAPI *SymFunctionTableAccess_t)(HANDLE, DWORD_PTR);
typedef DWORD_PTR (WINAPI *SymGetModuleBase_t)(HANDLE, DWORD_PTR);
typedef BOOL (WINAPI *SymGetLineFromAddr_t)(HANDLE, DWORD_PTR,
PDWORD, PIMAGEHLP_LINE);
typedef BOOL (WINAPI *SymSetContext_t)(HANDLE, PIMAGEHLP_STACK_FRAME,
PIMAGEHLP_CONTEXT);
@ -164,23 +164,44 @@ public:
CONST PMINIDUMP_USER_STREAM_INFORMATION,
CONST PMINIDUMP_CALLBACK_INFORMATION);
#define wxDO_FOR_ALL_SYM_FUNCS(what) \
what(SymGetOptions); \
what(SymSetOptions); \
what(SymInitialize); \
what(StackWalk); \
what(SymFromAddr); \
what(SymFunctionTableAccess); \
what(SymGetModuleBase); \
what(SymGetLineFromAddr); \
what(SymSetContext); \
what(SymEnumSymbols); \
what(SymGetTypeInfo); \
what(SymCleanup); \
what(EnumerateLoadedModules); \
what(MiniDumpWriteDump)
// The macro called by wxDO_FOR_ALL_SYM_FUNCS() below takes 2 arguments:
// the name of the function in the program code, which never has "64"
// suffix, and the name of the function in the DLL which can have "64"
// suffix in some cases. These 2 helper macros call the macro with the
// correct arguments in both cases.
#define wxSYM_CALL(what, name) what(name, name)
#if defined(_M_AMD64)
#define wxSYM_CALL_64(what, name) what(name, name ## 64)
#define wxDECLARE_SYM_FUNCTION(func) static func ## _t func
// Also undo all the "helpful" definitions done by imagehlp.h that map 32
// bit functions to 64 bit ones, we don't need this as we do it ourselves.
#undef StackWalk
#undef SymFunctionTableAccess
#undef SymGetModuleBase
#undef SymGetLineFromAddr
#undef EnumerateLoadedModules
#else
#define wxSYM_CALL_64(what, name) what(name, name)
#endif
#define wxDO_FOR_ALL_SYM_FUNCS(what) \
wxSYM_CALL_64(what, StackWalk); \
wxSYM_CALL_64(what, SymFunctionTableAccess); \
wxSYM_CALL_64(what, SymGetModuleBase); \
wxSYM_CALL_64(what, SymGetLineFromAddr); \
wxSYM_CALL_64(what, EnumerateLoadedModules); \
\
wxSYM_CALL(what, SymGetOptions); \
wxSYM_CALL(what, SymSetOptions); \
wxSYM_CALL(what, SymInitialize); \
wxSYM_CALL(what, SymFromAddr); \
wxSYM_CALL(what, SymSetContext); \
wxSYM_CALL(what, SymEnumSymbols); \
wxSYM_CALL(what, SymGetTypeInfo); \
wxSYM_CALL(what, SymCleanup); \
wxSYM_CALL(what, MiniDumpWriteDump)
#define wxDECLARE_SYM_FUNCTION(func, name) static func ## _t func
wxDO_FOR_ALL_SYM_FUNCS(wxDECLARE_SYM_FUNCTION);

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id: dialog.h 60559 2009-05-09 12:26:15Z VZ $
// RCS-ID: $Id: dialog.h 70511 2012-02-05 14:18:22Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -16,7 +16,7 @@
// this option is always enabled (there doesn't seem to be any good reason to
// disable it) for desktop Windows versions but Windows CE dialogs are usually
// not resizeable and never show resize gripper anyhow so don't use it there
// not resizable and never show resize gripper anyhow so don't use it there
#ifdef __WXWINCE__
#define wxUSE_DIALOG_SIZEGRIP 0
#else
@ -92,9 +92,9 @@ public:
// override some base class virtuals
virtual bool Show(bool show = true);
virtual void Raise();
#if wxUSE_DIALOG_SIZEGRIP
virtual void SetWindowStyleFlag(long style);
#endif // wxUSE_DIALOG_SIZEGRIP
#ifdef __POCKETPC__
// Responds to the OK button in a PocketPC titlebar. This
@ -114,7 +114,7 @@ protected:
private:
#if wxUSE_DIALOG_SIZEGRIP
// these functions deal with the gripper window shown in the corner of
// resizeable dialogs
// resizable dialogs
void CreateGripper();
void DestroyGripper();
void ShowGripper(bool show);

View File

@ -5,7 +5,7 @@
// Author: Julian Smart
// Modified by:
// Created: 08/04/99
// RCS-ID: $Id: dragimag.h 58757 2009-02-08 11:45:59Z VZ $
// RCS-ID: $Id: dragimag.h 70584 2012-02-15 00:35:25Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -114,14 +114,6 @@ public:
Create(image, cursor);
}
// Deprecated form of the above
wxDragImage(const wxBitmap& image, const wxCursor& cursor, const wxPoint& cursorHotspot)
{
Init();
Create(image, cursor, cursorHotspot);
}
wxDragImage(const wxIcon& image, const wxCursor& cursor = wxNullCursor)
{
Init();
@ -129,14 +121,6 @@ public:
Create(image, cursor);
}
// Deprecated form of the above
wxDragImage(const wxIcon& image, const wxCursor& cursor, const wxPoint& cursorHotspot)
{
Init();
Create(image, cursor, cursorHotspot);
}
wxDragImage(const wxString& str, const wxCursor& cursor = wxNullCursor)
{
Init();
@ -144,14 +128,6 @@ public:
Create(str, cursor);
}
// Deprecated form of the above
wxDragImage(const wxString& str, const wxCursor& cursor, const wxPoint& cursorHotspot)
{
Init();
Create(str, cursor, cursorHotspot);
}
#if wxUSE_TREECTRL
wxDragImage(const wxTreeCtrl& treeCtrl, wxTreeItemId& id)
{
@ -180,27 +156,12 @@ public:
// Create a drag image from a bitmap and optional cursor
bool Create(const wxBitmap& image, const wxCursor& cursor = wxNullCursor);
bool Create(const wxBitmap& image, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot))
{
wxLogDebug(wxT("wxDragImage::Create: use of a cursor hotspot is now deprecated. Please omit this argument."));
return Create(image, cursor);
}
// Create a drag image from an icon and optional cursor
bool Create(const wxIcon& image, const wxCursor& cursor = wxNullCursor);
bool Create(const wxIcon& image, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot))
{
wxLogDebug(wxT("wxDragImage::Create: use of a cursor hotspot is now deprecated. Please omit this argument."));
return Create(image, cursor);
}
// Create a drag image from a string and optional cursor
bool Create(const wxString& str, const wxCursor& cursor = wxNullCursor);
bool Create(const wxString& str, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot))
{
wxLogDebug(wxT("wxDragImage::Create: use of a cursor hotspot is now deprecated. Please omit this argument."));
return Create(str, cursor);
}
#if wxUSE_TREECTRL
// Create a drag image for the given tree control item
@ -248,6 +209,16 @@ public:
WXHIMAGELIST GetCursorHIMAGELIST() const { return m_hCursorImageList; }
#endif
// don't use in new code, use versions without hot spot parameter
#if WXWIN_COMPATIBILITY_2_8
wxDEPRECATED_CONSTRUCTOR( wxDragImage(const wxBitmap& image, const wxCursor& cursor, const wxPoint& cursorHotspot) );
wxDEPRECATED_CONSTRUCTOR( wxDragImage(const wxString& str, const wxCursor& cursor, const wxPoint& cursorHotspot) );
wxDEPRECATED_CONSTRUCTOR( wxDragImage(const wxIcon& image, const wxCursor& cursor, const wxPoint& cursorHotspot) );
wxDEPRECATED( bool Create(const wxBitmap& image, const wxCursor& cursor, const wxPoint& cursorHotspot) );
wxDEPRECATED( bool Create(const wxIcon& image, const wxCursor& cursor, const wxPoint& cursorHotspot) );
wxDEPRECATED( bool Create(const wxString& str, const wxCursor& cursor, const wxPoint& cursorHotspot) );
#endif // WXWIN_COMPATIBILITY_2_8
protected:
WXHIMAGELIST m_hImageList;

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 13.01.00
// RCS-ID: $Id: enhmeta.h 60843 2009-05-31 19:11:15Z VS $
// RCS-ID: $Id: enhmeta.h 68317 2011-07-21 13:49:59Z VZ $
// Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -89,6 +89,7 @@ public:
// as above, but takes reference DC as first argument to take resolution,
// size, font metrics etc. from
wxEXPLICIT
wxEnhMetaFileDC(const wxDC& referenceDC,
const wxString& filename = wxEmptyString,
int width = 0, int height = 0,

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id: font.h 65670 2010-09-29 13:46:09Z VZ $
// RCS-ID: $Id: font.h 70446 2012-01-23 11:28:28Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -91,6 +91,12 @@ public:
Create(info, hFont);
}
wxFont(int pointSize,
wxFontFamily family,
int flags = wxFONTFLAG_DEFAULT,
const wxString& face = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
wxFont(const wxString& fontDesc);
@ -117,6 +123,7 @@ public:
virtual wxFontStyle GetStyle() const;
virtual wxFontWeight GetWeight() const;
virtual bool GetUnderlined() const;
virtual bool GetStrikethrough() const;
virtual wxString GetFaceName() const;
virtual wxFontEncoding GetEncoding() const;
virtual const wxNativeFontInfo *GetNativeFontInfo() const;
@ -128,6 +135,7 @@ public:
virtual void SetWeight(wxFontWeight weight);
virtual bool SetFaceName(const wxString& faceName);
virtual void SetUnderlined(bool underlined);
virtual void SetStrikethrough(bool strikethrough);
virtual void SetEncoding(wxFontEncoding encoding);
wxDECLARE_COMMON_FONT_METHODS();

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id: frame.h 60337 2009-04-25 12:59:09Z FM $
// RCS-ID: $Id: frame.h 70511 2012-02-05 14:18:22Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -42,7 +42,6 @@ public:
// implement base class pure virtuals
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
virtual void Raise();
// implementation only from now on
// -------------------------------
@ -79,7 +78,6 @@ public:
bool HandleSize(int x, int y, WXUINT flag);
bool HandleCommand(WXWORD id, WXWORD cmd, WXHWND control);
bool HandleMenuSelect(WXWORD nItem, WXWORD nFlags, WXHMENU hMenu);
bool HandleMenuLoop(const wxEventType& evtType, WXWORD isPopup);
// tooltip management
#if wxUSE_TOOLTIPS
@ -133,8 +131,17 @@ protected:
// wxMDIChildFrame
bool MSWDoTranslateMessage(wxFrame *frame, WXMSG *msg);
// handle WM_INITMENUPOPUP message to generate wxEVT_MENU_OPEN
bool HandleInitMenuPopup(WXHMENU hMenu);
#if wxUSE_MENUS
// handle WM_EXITMENULOOP message for Win95 only
bool HandleExitMenuLoop(WXWORD isPopup);
// handle WM_(UN)INITMENUPOPUP message to generate wxEVT_MENU_OPEN/CLOSE
bool HandleMenuPopup(wxEventType evtType, WXHMENU hMenu);
// Command part of HandleMenuPopup() and HandleExitMenuLoop().
bool DoSendMenuOpenCloseEvent(wxEventType evtType, wxMenu* menu, bool popup);
#endif // wxUSE_MENUS
virtual bool IsMDIChild() const { return false; }

View File

@ -3,7 +3,7 @@
// Purpose: wxMSWFileSystemWatcher
// Author: Bartosz Bekier
// Created: 2009-05-26
// RCS-ID: $Id: fswatcher.h 62474 2009-10-22 11:35:43Z VZ $
// RCS-ID: $Id: fswatcher.h 67693 2011-05-03 23:31:39Z VZ $
// Copyright: (c) 2009 Bartosz Bekier <bartosz.bekier@gmail.com>
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -23,6 +23,12 @@ public:
wxMSWFileSystemWatcher(const wxFileName& path,
int events = wxFSW_EVENT_ALL);
// Override the base class function to provide a much more efficient
// implementation for it using the platform native support for watching the
// entire directory trees.
virtual bool AddTree(const wxFileName& path, int events = wxFSW_EVENT_ALL,
const wxString& filter = wxEmptyString);
protected:
bool Init();
};

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by:
// Created: 16/04/2000
// RCS-ID: $Id: helpchm.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: helpchm.h 67880 2011-06-07 14:28:55Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -82,7 +82,7 @@ protected:
wxString m_helpFile;
DECLARE_CLASS(wxCHMHelpController)
DECLARE_DYNAMIC_CLASS(wxCHMHelpController)
};
#endif // wxUSE_MS_HTML_HELP

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by:
// Created: 04/01/98
// RCS-ID: $Id: helpwin.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: helpwin.h 67882 2011-06-07 16:48:36Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -20,7 +20,7 @@
class WXDLLIMPEXP_CORE wxWinHelpController: public wxHelpControllerBase
{
DECLARE_CLASS(wxWinHelpController)
DECLARE_DYNAMIC_CLASS(wxWinHelpController)
public:
wxWinHelpController(wxWindow* parentWindow = NULL): wxHelpControllerBase(parentWindow) {}

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by: Agron Selimaj
// Created: 01/02/97
// RCS-ID: $Id: listctrl.h 64532 2010-06-09 13:55:48Z FM $
// RCS-ID: $Id: listctrl.h 70282 2012-01-07 15:09:43Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -16,7 +16,6 @@
#include "wx/dynarray.h"
#include "wx/vector.h"
class WXDLLIMPEXP_FWD_CORE wxImageList;
class wxMSWListItemData;
// define this symbol to indicate the availability of SetColumnsOrder() and
@ -77,7 +76,7 @@ class wxMSWListItemData;
*/
class WXDLLIMPEXP_CORE wxListCtrl: public wxControl
class WXDLLIMPEXP_CORE wxListCtrl: public wxListCtrlBase
{
public:
/*
@ -256,12 +255,6 @@ public:
void SetImageList(wxImageList *imageList, int which);
void AssignImageList(wxImageList *imageList, int which);
// are we in report mode?
bool InReportView() const { return HasFlag(wxLC_REPORT); }
// are we in virtual report mode?
bool IsVirtual() const { return HasFlag(wxLC_VIRTUAL); }
// refresh items selectively (only useful for virtual list controls)
void RefreshItem(long item);
void RefreshItems(long itemFrom, long itemTo);
@ -326,14 +319,6 @@ public:
// Insert an image/string item
long InsertItem(long index, const wxString& label, int imageIndex);
// For list view mode (only), inserts a column.
long InsertColumn(long col, const wxListItem& info);
long InsertColumn(long col,
const wxString& heading,
int format = wxLIST_FORMAT_LEFT,
int width = -1);
// set the number of items in a virtual list control
void SetItemCount(long count);
@ -399,6 +384,9 @@ protected:
// common part of all ctors
void Init();
// Implement base class pure virtual methods.
long DoInsertColumn(long col, const wxListItem& info);
// free memory taken by all internal data
void FreeAllInternalData();
@ -466,6 +454,10 @@ private:
// destroy m_textCtrl if it's currently valid and reset it to NULL
void DeleteEditControl();
// Intercept Escape and Enter keys to avoid them being stolen from our
// in-place editor control.
void OnCharHook(wxKeyEvent& event);
DECLARE_DYNAMIC_CLASS(wxListCtrl)
DECLARE_EVENT_TABLE()

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by: Vadim Zeitlin (wxMenuItem is now in separate file)
// Created: 01/02/97
// RCS-ID: $Id: menu.h 66178 2010-11-17 01:20:50Z VZ $
// RCS-ID: $Id: menu.h 70350 2012-01-15 13:41:17Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -25,6 +25,7 @@ class WXDLLIMPEXP_FWD_CORE wxFrame;
class WXDLLIMPEXP_FWD_CORE wxToolBar;
#endif
class wxMenuRadioItemsData;
// Not using a combined wxToolBar/wxMenuBar? then use
// a commandbar in WinCE .NET to implement the
@ -60,16 +61,27 @@ public:
virtual void SetTitle(const wxString& title);
// MSW-only methods
// ----------------
// Create a new menu from the given native HMENU. Takes ownership of the
// menu handle and will delete it when this object is destroyed.
static wxMenu *MSWNewFromHMENU(WXHMENU hMenu) { return new wxMenu(hMenu); }
// implementation only from now on
// -------------------------------
virtual void Attach(wxMenuBarBase *menubar);
bool MSWCommand(WXUINT param, WXWORD id);
// get the native menu handle
WXHMENU GetHMenu() const { return m_hMenu; }
// Return the start and end position of the radio group to which the item
// at the given position belongs. Returns false if there is no radio group
// containing this position.
bool MSWGetRadioGroupRange(int pos, int *start, int *end) const;
#if wxUSE_ACCEL
// called by wxMenuBar to build its accel table from the accels of all menus
bool HasAccels() const { return !m_accels.empty(); }
@ -102,6 +114,9 @@ public:
m_maxAccelWidth = -1;
}
// get the menu with given handle (recursively)
wxMenu* MSWGetMenu(WXHMENU hMenu);
private:
void CalculateMaxAccelWidth();
@ -113,21 +128,30 @@ protected:
virtual wxMenuItem* DoRemove(wxMenuItem *item);
private:
// common part of all ctors
// This constructor is private, use MSWNewFromHMENU() to use it.
wxMenu(WXHMENU hMenu);
// Common part of all ctors, it doesn't create a new HMENU.
void InitNoCreate();
// Common part of all ctors except of the one above taking a native menu
// handler: calls InitNoCreate() and also creates a new menu.
void Init();
// common part of Append/Insert (behaves as Append is pos == (size_t)-1)
bool DoInsertOrAppend(wxMenuItem *item, size_t pos = (size_t)-1);
// terminate the current radio group, if any
void EndRadioGroup();
// This variable contains the description of the radio item groups and
// allows to find whether an item at the given position is part of the
// group and also where its group starts and ends.
//
// It is initially NULL and only allocated if we have any radio items.
wxMenuRadioItemsData *m_radioData;
// if true, insert a breal before appending the next item
bool m_doBreak;
// the position of the first item in the current radio group or -1
int m_startRadioGroup;
// the menu handle of this menu
WXHMENU m_hMenu;
@ -173,6 +197,7 @@ public:
virtual wxMenu *Remove(size_t pos);
virtual void EnableTop( size_t pos, bool flag );
virtual bool IsEnabledTop(size_t pos) const;
virtual void SetMenuLabel( size_t pos, const wxString& label );
virtual wxString GetMenuLabel( size_t pos ) const;
@ -208,6 +233,9 @@ public:
void Refresh( bool eraseBackground,
const wxRect *rect = (const wxRect *) NULL ) { wxWindow::Refresh(eraseBackground, rect); }
// get the menu with given handle (recursively)
wxMenu* MSWGetMenu(WXHMENU hMenu);
protected:
// common part of all ctors
void Init();

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 11.11.97
// RCS-ID: $Id: menuitem.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: menuitem.h 70801 2012-03-04 00:29:55Z VZ $
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -61,11 +61,6 @@ public:
// Win32 API
WXWPARAM GetMSWId() const;
// mark item as belonging to the given radio group
void SetAsRadioGroupStart();
void SetRadioGroupStart(int start);
void SetRadioGroupEnd(int end);
#if WXWIN_COMPATIBILITY_2_8
// compatibility only, don't use in new code
wxDEPRECATED(
@ -124,24 +119,21 @@ private:
// helper function for draw std menu check mark
void DrawStdCheckMark(WXHDC hdc, const tagRECT* rc, wxODStatus stat);
#endif // wxUSE_OWNER_DRAWN
#else // !wxUSE_OWNER_DRAWN
// Provide stubs for the public functions above to ensure that the code
// still compiles without wxUSE_OWNER_DRAWN -- it makes sense to just drop
// the bitmaps then instead of failing compilation.
void SetBitmaps(const wxBitmap& WXUNUSED(bmpChecked),
const wxBitmap& WXUNUSED(bmpUnchecked) = wxNullBitmap) { }
void SetBitmap(const wxBitmap& WXUNUSED(bmp),
bool WXUNUSED(bChecked) = true) { }
const wxBitmap& GetBitmap() const { return wxNullBitmap; }
#endif // wxUSE_OWNER_DRAWN/!wxUSE_OWNER_DRAWN
private:
// common part of all ctors
void Init();
// the positions of the first and last items of the radio group this item
// belongs to or -1: start is the radio group start and is valid for all
// but first radio group items (m_isRadioGroupStart == false), end is valid
// only for the first one
union
{
int start;
int end;
} m_radioGroup;
// does this item start a radio group?
bool m_isRadioGroupStart;
#if wxUSE_OWNER_DRAWN
// item bitmaps

View File

@ -3,7 +3,7 @@
// Purpose: Declarations for parts of the Win32 SDK that are missing in
// the versions that come with some compilers
// Created: 2002/04/23
// RCS-ID: $Id: missing.h 66996 2011-02-22 13:26:06Z VZ $
// RCS-ID: $Id: missing.h 69844 2011-11-27 19:50:53Z VZ $
// Copyright: (c) 2002 Mattia Barbon
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -94,6 +94,7 @@
#define VK_OEM_5 0xDC
#define VK_OEM_6 0xDD
#define VK_OEM_7 0xDE
#define VK_OEM_102 0xE2
#endif
#ifndef VK_OEM_COMMA
@ -514,6 +515,152 @@ typedef struct
#endif
#endif
//Various defines that will be needed by mingw and possibly VC++6
//Used by the webview library
#ifndef DISPID_COMMANDSTATECHANGE
#define DISPID_COMMANDSTATECHANGE 105
#endif
#ifndef DISPID_NAVIGATECOMPLETE2
#define DISPID_NAVIGATECOMPLETE2 252
#endif
#ifndef DISPID_NAVIGATEERROR
#define DISPID_NAVIGATEERROR 271
#endif
#ifndef DISPID_NEWWINDOW3
#define DISPID_NEWWINDOW3 273
#endif
#ifndef INET_E_ERROR_FIRST
#define INET_E_ERROR_FIRST 0x800C0002L
#endif
#ifndef INET_E_INVALID_URL
#define INET_E_INVALID_URL 0x800C0002L
#endif
#ifndef INET_E_NO_SESSION
#define INET_E_NO_SESSION 0x800C0003L
#endif
#ifndef INET_E_CANNOT_CONNECT
#define INET_E_CANNOT_CONNECT 0x800C0004L
#endif
#ifndef INET_E_RESOURCE_NOT_FOUND
#define INET_E_RESOURCE_NOT_FOUND 0x800C0005L
#endif
#ifndef INET_E_OBJECT_NOT_FOUND
#define INET_E_OBJECT_NOT_FOUND 0x800C0006L
#endif
#ifndef INET_E_DATA_NOT_AVAILABLE
#define INET_E_DATA_NOT_AVAILABLE 0x800C0007L
#endif
#ifndef INET_E_DOWNLOAD_FAILURE
#define INET_E_DOWNLOAD_FAILURE 0x800C0008L
#endif
#ifndef INET_E_AUTHENTICATION_REQUIRED
#define INET_E_AUTHENTICATION_REQUIRED 0x800C0009L
#endif
#ifndef INET_E_NO_VALID_MEDIA
#define INET_E_NO_VALID_MEDIA 0x800C000AL
#endif
#ifndef INET_E_CONNECTION_TIMEOUT
#define INET_E_CONNECTION_TIMEOUT 0x800C000BL
#endif
#ifndef INET_E_INVALID_REQUEST
#define INET_E_INVALID_REQUEST 0x800C000CL
#endif
#ifndef INET_E_UNKNOWN_PROTOCOL
#define INET_E_UNKNOWN_PROTOCOL 0x800C000DL
#endif
#ifndef INET_E_SECURITY_PROBLEM
#define INET_E_SECURITY_PROBLEM 0x800C000EL
#endif
#ifndef INET_E_CANNOT_LOAD_DATA
#define INET_E_CANNOT_LOAD_DATA 0x800C000FL
#endif
#ifndef INET_E_CANNOT_INSTANTIATE_OBJECT
#define INET_E_CANNOT_INSTANTIATE_OBJECT 0x800C0010L
#endif
#ifndef INET_E_QUERYOPTION_UNKNOWN
#define INET_E_QUERYOPTION_UNKNOWN 0x800C0013L
#endif
#ifndef INET_E_REDIRECT_FAILED
#define INET_E_REDIRECT_FAILED 0x800C0014L
#endif
#ifndef INET_E_REDIRECT_TO_DIR
#define INET_E_REDIRECT_TO_DIR 0x800C0015L
#endif
#ifndef INET_E_CANNOT_LOCK_REQUEST
#define INET_E_CANNOT_LOCK_REQUEST 0x800C0016L
#endif
#ifndef INET_E_USE_EXTEND_BINDING
#define INET_E_USE_EXTEND_BINDING 0x800C0017L
#endif
#ifndef INET_E_TERMINATED_BIND
#define INET_E_TERMINATED_BIND 0x800C0018L
#endif
#ifndef INET_E_INVALID_CERTIFICATE
#define INET_E_INVALID_CERTIFICATE 0x800C0019L
#endif
#ifndef INET_E_CODE_DOWNLOAD_DECLINED
#define INET_E_CODE_DOWNLOAD_DECLINED 0x800C0100L
#endif
#ifndef INET_E_RESULT_DISPATCHED
#define INET_E_RESULT_DISPATCHED 0x800C0200L
#endif
#ifndef INET_E_CANNOT_REPLACE_SFP_FILE
#define INET_E_CANNOT_REPLACE_SFP_FILE 0x800C0300L
#endif
#ifndef INET_E_CODE_INSTALL_BLOCKED_BY_HASH_POLICY
#define INET_E_CODE_INSTALL_BLOCKED_BY_HASH_POLICY 0x800C0500L
#endif
#ifndef INET_E_CODE_INSTALL_SUPPRESSED
#define INET_E_CODE_INSTALL_SUPPRESSED 0x800C0400L
#endif
//We need to check if we are using MinGW or mingw-w64 as their
//definitions are different
#ifdef __MINGW32__
#include <_mingw.h>
#endif
#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
typedef enum CommandStateChangeConstants {
CSC_UPDATECOMMANDS = (int) 0xFFFFFFFF,
CSC_NAVIGATEFORWARD = 0x1,
CSC_NAVIGATEBACK = 0x2
} CommandStateChangeConstants;
#endif
/*

View File

@ -0,0 +1,39 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/nonownedwnd.h
// Purpose: wxNonOwnedWindow declaration for wxMSW.
// Author: Vadim Zeitlin
// Created: 2011-10-09
// RCS-ID: $Id: nonownedwnd.h 69462 2011-10-18 21:56:52Z VZ $
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_NONOWNEDWND_H_
#define _WX_MSW_NONOWNEDWND_H_
class wxNonOwnedWindowShapeImpl;
// ----------------------------------------------------------------------------
// wxNonOwnedWindow
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxNonOwnedWindow : public wxNonOwnedWindowBase
{
public:
wxNonOwnedWindow();
virtual ~wxNonOwnedWindow();
protected:
virtual bool DoClearShape();
virtual bool DoSetRegionShape(const wxRegion& region);
#if wxUSE_GRAPHICS_CONTEXT
virtual bool DoSetPathShape(const wxGraphicsPath& path);
private:
wxNonOwnedWindowShapeImpl* m_shapeImpl;
#endif // wxUSE_GRAPHICS_CONTEXT
wxDECLARE_NO_COPY_CLASS(wxNonOwnedWindow);
};
#endif // _WX_MSW_NONOWNEDWND_H_

View File

@ -3,7 +3,7 @@
// Purpose: MSW/GTK compatible notebook (a.k.a. property sheet)
// Author: Robert Roebling
// Modified by: Vadim Zeitlin for Windows version
// RCS-ID: $Id: notebook.h 67250 2011-03-20 00:00:29Z VZ $
// RCS-ID: $Id: notebook.h 69793 2011-11-22 13:18:45Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -96,7 +96,7 @@ public:
wxNotebookPage *pPage,
const wxString& strText,
bool bSelect = false,
int imageId = -1);
int imageId = NO_IMAGE);
// Windows-only at present. Also, you must use the wxNB_FIXEDWIDTH
// style.
@ -194,6 +194,9 @@ protected:
// true if we have already subclassed our updown control
bool m_hasSubclassedUpdown;
// true if we already refreshed the current page after showing the window
bool m_doneUpdateHack;
#endif // __WXWINCE__
#if wxUSE_UXTHEME

View File

@ -4,7 +4,7 @@
// Author: Ryan Norton <wxprojects@comcast.net>
// Modified by:
// Created: 8/18/05
// RCS-ID: $Id: activex.h 64533 2010-06-09 14:28:08Z FM $
// RCS-ID: $Id: activex.h 70361 2012-01-15 19:05:34Z SJL $
// Copyright: (c) Ryan Norton
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -168,6 +168,8 @@ public:
void OnPaint(wxPaintEvent&);
void OnSetFocus(wxFocusEvent&);
void OnKillFocus(wxFocusEvent&);
virtual bool MSWTranslateMessage(WXMSG* pMsg);
virtual bool QueryClientSiteInterface(REFIID iid, void **_interface, const char *&desc);
protected:
friend class FrameSite;

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 19.02.1998
// RCS-ID: $Id: oleutils.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: oleutils.h 70162 2011-12-29 11:26:05Z SN $
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -82,7 +82,7 @@ inline void ReleaseInterface(IUnknown *pIUnk)
#define RELEASE_AND_NULL(p) if ( (p) != NULL ) { p->Release(); p = NULL; };
// return true if the iid is in the array
extern bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount);
extern WXDLLIMPEXP_CORE bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount);
// ============================================================================
// IUnknown implementation helpers
@ -140,9 +140,10 @@ private:
wxAutoULong m_cRef
// macros for declaring supported interfaces
// NB: you should write ADD_INTERFACE(Foo) and not ADD_INTERFACE(IID_IFoo)!
// NB: ADD_IID prepends IID_I whereas ADD_RAW_IID does not
#define BEGIN_IID_TABLE(cname) const IID *cname::ms_aIids[] = {
#define ADD_IID(iid) &IID_I##iid,
#define ADD_RAW_IID(iid) &iid,
#define END_IID_TABLE }
// implementation is as straightforward as possible
@ -197,11 +198,11 @@ private:
// ----------------------------------------------------------------------------
// tries to translate riid into a symbolic name, if possible
void wxLogQueryInterface(const wxChar *szInterface, REFIID riid);
WXDLLIMPEXP_CORE void wxLogQueryInterface(const wxChar *szInterface, REFIID riid);
// these functions print out the new value of reference counter
void wxLogAddRef (const wxChar *szInterface, ULONG cRef);
void wxLogRelease(const wxChar *szInterface, ULONG cRef);
WXDLLIMPEXP_CORE void wxLogAddRef (const wxChar *szInterface, ULONG cRef);
WXDLLIMPEXP_CORE void wxLogRelease(const wxChar *szInterface, ULONG cRef);
#else //!__WXDEBUG__
#define wxLogQueryInterface(szInterface, riid)

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id: palette.h 52834 2008-03-26 15:06:00Z FM $
// RCS-ID: $Id: palette.h 70040 2011-12-17 23:52:47Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -19,13 +19,13 @@ class WXDLLIMPEXP_CORE wxPalette : public wxPaletteBase
public:
wxPalette() { }
wxPalette(int n,
unsigned char *red, unsigned char *green, unsigned char *blue)
const unsigned char *red, const unsigned char *green, const unsigned char *blue)
{
Create(n, red, green, blue);
}
bool Create(int n,
unsigned char *red, unsigned char *green, unsigned char *blue);
const unsigned char *red, const unsigned char *green, const unsigned char *blue);
virtual int GetColoursCount() const;

View File

@ -3,7 +3,7 @@
// Purpose: wxMSW-specific wxPanel class.
// Author: Vadim Zeitlin
// Created: 2011-03-18
// RCS-ID: $Id: panel.h 67253 2011-03-20 00:00:49Z VZ $
// RCS-ID: $Id: panel.h 70098 2011-12-23 05:59:59Z PC $
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -20,7 +20,7 @@ class WXDLLIMPEXP_FWD_CORE wxBrush;
class WXDLLIMPEXP_CORE wxPanel : public wxPanelBase
{
public:
wxPanel() { Init(); }
wxPanel() { }
wxPanel(wxWindow *parent,
wxWindowID winid = wxID_ANY,
@ -29,8 +29,6 @@ public:
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
const wxString& name = wxPanelNameStr)
{
Init();
Create(parent, winid, pos, size, style, name);
}
@ -40,7 +38,7 @@ public:
virtual bool HasTransparentBackground();
#ifdef WXWIN_COMPATIBILITY_2_8
#if WXWIN_COMPATIBILITY_2_8
wxDEPRECATED_CONSTRUCTOR(
wxPanel(wxWindow *parent,
int x, int y, int width, int height,
@ -52,18 +50,7 @@ public:
)
#endif // WXWIN_COMPATIBILITY_2_8
protected:
void Init()
{
m_backgroundBrush = NULL;
}
virtual void DoSetBackgroundBitmap(const wxBitmap& bmp);
virtual WXHBRUSH MSWGetCustomBgBrush();
private:
wxBrush *m_backgroundBrush;
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxPanel);
};

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id: printdlg.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: printdlg.h 70636 2012-02-20 21:55:55Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -20,6 +20,7 @@
#include "wx/printdlg.h"
class WXDLLIMPEXP_FWD_CORE wxDC;
class WinPrinter;
//----------------------------------------------------------------------------
// wxWindowsPrintNativeData
@ -37,6 +38,7 @@ public:
virtual bool Ok() const { return IsOk(); }
virtual bool IsOk() const;
void InitializeDevMode(const wxString &printerName = wxEmptyString, WinPrinter* printer = NULL);
void* GetDevMode() const { return m_devMode; }
void SetDevMode(void* data) { m_devMode = data; }
void* GetDevNames() const { return m_devNames; }
@ -105,7 +107,7 @@ public:
bool ConvertToNative( wxPageSetupDialogData &data );
bool ConvertFromNative( wxPageSetupDialogData &data );
virtual wxPageSetupData& GetPageSetupDialogData() { return m_pageSetupData; }
virtual wxPageSetupDialogData& GetPageSetupDialogData() { return m_pageSetupData; }
private:
wxPageSetupDialogData m_pageSetupData;

View File

@ -6,7 +6,7 @@
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id: private.h 65958 2010-10-30 23:50:45Z VZ $
// RCS-ID: $Id: private.h 69758 2011-11-14 12:51:53Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -454,7 +454,7 @@ private:
void DoInit(HGDIOBJ hgdiobj) { m_hgdiobj = ::SelectObject(m_hdc, hgdiobj); }
public:
SelectInHDC() : m_hdc(NULL) { }
SelectInHDC() : m_hdc(NULL), m_hgdiobj(NULL) { }
SelectInHDC(HDC hdc, HGDIOBJ hgdiobj) : m_hdc(hdc) { DoInit(hgdiobj); }
void Init(HDC hdc, HGDIOBJ hgdiobj)
@ -923,6 +923,9 @@ WXDLLIMPEXP_BASE wxWinVersion wxGetWinVersion();
extern HCURSOR wxGetCurrentBusyCursor(); // from msw/utils.cpp
extern const wxCursor *wxGetGlobalCursor(); // from msw/cursor.cpp
// GetCursorPos can fail without populating the POINT. This falls back to GetMessagePos.
WXDLLIMPEXP_CORE void wxGetCursorPosMSW(POINT* pt);
WXDLLIMPEXP_CORE void wxGetCharSize(WXHWND wnd, int *x, int *y, const wxFont& the_font);
WXDLLIMPEXP_CORE void wxFillLogFont(LOGFONT *logFont, const wxFont *font);
WXDLLIMPEXP_CORE wxFont wxCreateFontFromLogFont(const LOGFONT *logFont);

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();

View File

@ -3,7 +3,7 @@
// Purpose: wxProgressDialog
// Author: Rickard Westerlund
// Created: 2010-07-22
// RCS-ID: $Id: progdlg.h 65574 2010-09-20 13:11:03Z VZ $
// RCS-ID: $Id: progdlg.h 69041 2011-09-10 03:26:37Z RD $
// Copyright: (c) 2010 wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -47,6 +47,8 @@ public:
// Must provide overload to avoid hiding it (and warnings about it)
virtual void Update() { wxGenericProgressDialog::Update(); }
virtual WXWidget GetHandle() const;
private:
// Performs common routines to Update() and Pulse(). Requires the
// shared object to have been entered.

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id: radiobox.h 65957 2010-10-30 23:50:39Z VZ $
// RCS-ID: $Id: radiobox.h 70498 2012-02-02 14:26:06Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -149,6 +149,9 @@ protected:
// get the total size occupied by the radio box buttons
wxSize GetTotalButtonSize(const wxSize& sizeBtn) const;
// Adjust all the buttons to the new window size.
void PositionAllButtons(int x, int y, int width, int height);
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
@ -163,6 +166,8 @@ protected:
virtual WXHRGN MSWGetRegionWithoutChildren();
#endif // __WXWINCE__
// resolve ambiguity in base classes
virtual wxBorder GetDefaultBorder() const { return wxRadioBoxBase::GetDefaultBorder(); }
// the buttons we contain
wxSubwindows *m_radioButtons;

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id: setup0.h 67062 2011-02-27 12:48:07Z VZ $
// RCS-ID: $Id: setup0.h 69463 2011-10-18 21:57:02Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -201,15 +201,6 @@
// Recommended setting: 0 (this is still work in progress...)
#define wxUSE_EXTENDED_RTTI 0
// Set wxUSE_STL to 1 to derive wxList(Foo) and wxArray(Foo) from
// std::list<Foo*> and std::vector<Foo*>, with a compatibility interface,
// and for wxHashMap to be implemented with templates.
//
// Default is 0
//
// Recommended setting: YMMV
#define wxUSE_STL 0
// Support for message/error logging. This includes wxLogXXX() functions and
// wxLog and derived classes. Don't set this to 0 unless you really know what
// you are doing.
@ -261,44 +252,6 @@
// Recommended setting: 1 as setting it to 0 disables many other things
#define wxUSE_STREAMS 1
// This is not a real option but is used as the default value for
// wxUSE_STD_IOSTREAM and wxUSE_STD_STRING.
//
// Currently the Digital Mars and Watcom compilers come without standard C++
// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have
// them (e.g. from STLPort).
//
// VC++ 5.0 does include standard C++ library headers, however they produce
// many warnings that can't be turned off when compiled at warning level 4.
#if defined(__DMC__) || defined(__WATCOMC__) \
|| (defined(_MSC_VER) && _MSC_VER < 1200)
#define wxUSE_STD_DEFAULT 0
#else
#define wxUSE_STD_DEFAULT 1
#endif
// Use standard C++ streams if 1 instead of wx streams in some places. If
// disabled (default), wx streams are used everywhere and wxWidgets doesn't
// depend on the standard streams library.
//
// Notice that enabling this does not replace wx streams with std streams
// everywhere, in a lot of places wx streams are used no matter what.
//
// Default is 0
//
// Recommended setting: 1 if you use the standard streams anyhow and so
// dependency on the standard streams library is not a
// problem
#define wxUSE_STD_IOSTREAM wxUSE_STD_DEFAULT
// Enable conversion to standard C++ string if 1.
//
// Default is 1 for most compilers.
//
// Recommended setting: 1 unless you want to ensure your program doesn't use
// the standard C++ library at all.
#define wxUSE_STD_STRING wxUSE_STD_DEFAULT
// Support for positional parameters (e.g. %1$d, %2$s ...) in wxVsnprintf.
// Note that if the system's implementation does not support positional
// parameters, setting this to 1 forces the use of the wxWidgets implementation
@ -314,6 +267,107 @@
// Recommended setting: 1 if you want to support multiple languages
#define wxUSE_PRINTF_POS_PARAMS 1
// ----------------------------------------------------------------------------
// Interoperability with the standard library.
// ----------------------------------------------------------------------------
// Set wxUSE_STL to 1 to enable maximal interoperability with the standard
// library, even at the cost of backwards compatibility.
//
// Default is 0
//
// Recommended setting: 0 as the options below already provide a relatively
// good level of interoperability and changing this option arguably isn't worth
// diverging from the official builds of the library.
#define wxUSE_STL 0
// This is not a real option but is used as the default value for
// wxUSE_STD_IOSTREAM, wxUSE_STD_STRING and wxUSE_STD_CONTAINERS.
//
// Currently the Digital Mars and Watcom compilers come without standard C++
// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have
// them (e.g. from STLPort).
//
// VC++ 5.0 does include standard C++ library headers, however they produce
// many warnings that can't be turned off when compiled at warning level 4.
#if defined(__DMC__) || defined(__WATCOMC__) \
|| (defined(_MSC_VER) && _MSC_VER < 1200)
#define wxUSE_STD_DEFAULT 0
#else
#define wxUSE_STD_DEFAULT 1
#endif
// Use standard C++ containers to implement wxVector<>, wxStack<>, wxDList<>
// and wxHashXXX<> classes. If disabled, wxWidgets own (mostly compatible but
// usually more limited) implementations are used which allows to avoid the
// dependency on the C++ run-time library.
//
// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't
// support using standard containers and that VC6 needs non-default options for
// such build to avoid getting "fatal error C1076: compiler limit : internal
// heap limit reached; use /Zm to specify a higher limit" in its own standard
// headers, so you need to ensure you do increase the heap size before enabling
// this option for this compiler.
//
// Default is 0 for compatibility reasons.
//
// Recommended setting: 1 unless compatibility with the official wxWidgets
// build and/or the existing code is a concern.
#define wxUSE_STD_CONTAINERS 0
// Use standard C++ streams if 1 instead of wx streams in some places. If
// disabled, wx streams are used everywhere and wxWidgets doesn't depend on the
// standard streams library.
//
// Notice that enabling this does not replace wx streams with std streams
// everywhere, in a lot of places wx streams are used no matter what.
//
// Default is 1 if compiler supports it.
//
// Recommended setting: 1 if you use the standard streams anyhow and so
// dependency on the standard streams library is not a
// problem
#define wxUSE_STD_IOSTREAM wxUSE_STD_DEFAULT
// Enable minimal interoperability with the standard C++ string class if 1.
// "Minimal" means that wxString can be constructed from std::string or
// std::wstring but can't be implicitly converted to them. You need to enable
// the option below for the latter.
//
// Default is 1 for most compilers.
//
// Recommended setting: 1 unless you want to ensure your program doesn't use
// the standard C++ library at all.
#define wxUSE_STD_STRING wxUSE_STD_DEFAULT
// Make wxString as much interchangeable with std::[w]string as possible, in
// particular allow implicit conversion of wxString to either of these classes.
// This comes at a price (or a benefit, depending on your point of view) of not
// allowing implicit conversion to "const char *" and "const wchar_t *".
//
// Because a lot of existing code relies on these conversions, this option is
// disabled by default but can be enabled for your build if you don't care
// about compatibility.
//
// Default is 0 if wxUSE_STL has its default value or 1 if it is enabled.
//
// Recommended setting: 0 to remain compatible with the official builds of
// wxWidgets.
#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL
// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix
// them. Set this option to 1 to use <iostream.h>, 0 to use <iostream>.
//
// Note that newer compilers (including VC++ 7.1 and later) don't support
// wxUSE_IOSTREAMH == 1 and so <iostream> will be used anyhow.
//
// Default is 0.
//
// Recommended setting: 0, only set to 1 if you use a really old compiler
#define wxUSE_IOSTREAMH 0
// ----------------------------------------------------------------------------
// non GUI features selection
// ----------------------------------------------------------------------------
@ -651,6 +705,34 @@
// Recommended setting: 1
#define wxUSE_STC 1
// Use wxWidget's web viewing classes
//
// Default is 1
//
// Recommended setting: 1
#define wxUSE_WEBVIEW 1
// Use the IE wxWebView backend
//
// Default is 1 on MSW
//
// Recommended setting: 1
#ifdef __WXMSW__
#define wxUSE_WEBVIEW_IE 1
#else
#define wxUSE_WEBVIEW_IE 0
#endif
// Use the WebKit wxWebView backend
//
// Default is 1 on GTK and OSX
//
// Recommended setting: 1
#if defined(__WXGTK__) || defined(__WXOSX__)
#define wxUSE_WEBVIEW_WEBKIT 1
#else
#define wxUSE_WEBVIEW_WEBKIT 0
#endif
// Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced
// 2D drawing API. (Still somewhat experimental)
@ -749,6 +831,7 @@
//
// Recommended setting: 1
#define wxUSE_ANIMATIONCTRL 1 // wxAnimationCtrl
#define wxUSE_BANNERWINDOW 1 // wxBannerWindow
#define wxUSE_BUTTON 1 // wxButton
#define wxUSE_BMPBUTTON 1 // wxBitmapButton
#define wxUSE_CALENDARCTRL 1 // wxCalendarCtrl
@ -784,8 +867,10 @@
#define wxUSE_STATTEXT 1 // wxStaticText
#define wxUSE_STATBMP 1 // wxStaticBitmap
#define wxUSE_TEXTCTRL 1 // wxTextCtrl
#define wxUSE_TIMEPICKCTRL 1 // wxTimePickerCtrl
#define wxUSE_TOGGLEBTN 1 // requires wxButton
#define wxUSE_TREECTRL 1 // wxTreeCtrl
#define wxUSE_TREELISTCTRL 1 // wxTreeListCtrl
// Use a status bar class? Depending on the value of wxUSE_NATIVE_STATUSBAR
// below either wxStatusBar95 or a generic wxStatusBar will be used.
@ -1002,6 +1087,14 @@
// Recommended setting: 1
#define wxUSE_NOTIFICATION_MESSAGE 1
// wxRichToolTip is a customizable tooltip class which has more functionality
// than the stock (but native, unlike this class) wxToolTip.
//
// Default is 1.
//
// Recommended setting: 1 (but can be safely set to 0 if you don't need it)
#define wxUSE_RICHTOOLTIP 1
// Use wxSashWindow class.
//
// Default is 1.
@ -1307,28 +1400,15 @@
// to create files in SVG (Scalable Vector Graphics) format.
#define wxUSE_SVG 1
// ----------------------------------------------------------------------------
// other compiler (mis)features
// ----------------------------------------------------------------------------
// Set this to 0 if your compiler can't cope with omission of prototype
// parameters.
// Should wxDC provide SetTransformMatrix() and related methods?
//
// Default is 1.
// Default is 1 but can be set to 0 if this functionality is not used. Notice
// that currently only wxMSW supports this so setting this to 0 doesn't change
// much for non-MSW platforms (although it will still save a few bytes
// probably).
//
// Recommended setting: 1 (should never need to set this to 0)
#define REMOVE_UNUSED_ARG 1
// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix
// them. Set this option to 1 to use <iostream.h>, 0 to use <iostream>.
//
// Note that newer compilers (including VC++ 7.1 and later) don't support
// wxUSE_IOSTREAMH == 1 and so <iostream> will be used anyhow.
//
// Default is 0.
//
// Recommended setting: 0, only set to 1 if you use a really old compiler
#define wxUSE_IOSTREAMH 0
// Recommended setting: 1.
#define wxUSE_DC_TRANSFORM_MATRIX 1
// ----------------------------------------------------------------------------
// image format support
@ -1452,7 +1532,7 @@
// Recommended setting: 1, required by wxMediaCtrl
#define wxUSE_ACTIVEX 1
// wxDC cacheing implementation
// wxDC caching implementation
#define wxUSE_DC_CACHEING 1
// Set this to 1 to enable wxDIB class used internally for manipulating
@ -1533,6 +1613,14 @@
// Recommended setting: 0, this is mainly used for testing
#define wxUSE_DATEPICKCTRL_GENERIC 0
// Set this to 1 to be able to use wxTimePickerCtrlGeneric in addition to the
// native wxTimePickerCtrl for the platforms that have the latter (MSW).
//
// Default is 0.
//
// Recommended setting: 0, this is mainly used for testing
#define wxUSE_TIMEPICKCTRL_GENERIC 0
// ----------------------------------------------------------------------------
// Crash debugging helpers
// ----------------------------------------------------------------------------

View File

@ -3,7 +3,7 @@
// Purpose: MSW-specific setup.h options
// Author: Vadim Zeitlin
// Created: 2007-07-21 (extracted from wx/msw/setup0.h)
// RCS-ID: $Id: setup_inc.h 50586 2007-12-08 20:51:21Z VZ $
// RCS-ID: $Id: setup_inc.h 69224 2011-09-29 13:43:15Z VZ $
// Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -63,7 +63,7 @@
// Recommended setting: 1, required by wxMediaCtrl
#define wxUSE_ACTIVEX 1
// wxDC cacheing implementation
// wxDC caching implementation
#define wxUSE_DC_CACHEING 1
// Set this to 1 to enable wxDIB class used internally for manipulating
@ -144,6 +144,14 @@
// Recommended setting: 0, this is mainly used for testing
#define wxUSE_DATEPICKCTRL_GENERIC 0
// Set this to 1 to be able to use wxTimePickerCtrlGeneric in addition to the
// native wxTimePickerCtrl for the platforms that have the latter (MSW).
//
// Default is 0.
//
// Recommended setting: 0, this is mainly used for testing
#define wxUSE_TIMEPICKCTRL_GENERIC 0
// ----------------------------------------------------------------------------
// Crash debugging helpers
// ----------------------------------------------------------------------------

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id: slider.h 66844 2011-02-05 16:36:30Z VZ $
// RCS-ID: $Id: slider.h 68230 2011-07-11 22:49:33Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -106,6 +106,10 @@ protected:
wxRect GetBoundingBox() const;
// Get the height and, if the pointers are non NULL, widths of both labels.
//
// Notice that the return value will be 0 if we don't have wxSL_LABELS
// style but we do fill widthMin and widthMax even if we don't have
// wxSL_MIN_MAX_LABELS style set so the caller should account for it.
int GetLabelsSize(int *widthMin = NULL, int *widthMax = NULL) const;
@ -123,8 +127,6 @@ protected:
int m_pageSize;
int m_lineSize;
int m_tickFreq;
int m_minLabelWidth;
int m_maxLabelWidth;
// flag needed to detect whether we're getting THUMBRELEASE event because
// of dragging the thumb or scrolling the mouse wheel

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id: sound.h 58757 2009-02-08 11:45:59Z VZ $
// RCS-ID: $Id: sound.h 69178 2011-09-21 15:08:02Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -19,14 +19,14 @@ class WXDLLIMPEXP_ADV wxSound : public wxSoundBase
public:
wxSound();
wxSound(const wxString& fileName, bool isResource = false);
wxSound(int size, const wxByte* data);
wxSound(size_t size, const void* data);
virtual ~wxSound();
// Create from resource or file
bool Create(const wxString& fileName, bool isResource = false);
// Create from data
bool Create(int size, const wxByte* data);
bool Create(size_t size, const void* data);
bool IsOk() const { return m_data != NULL; }

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 22.07.99
// RCS-ID: $Id: spinctrl.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: spinctrl.h 70799 2012-03-04 00:29:48Z VZ $
// Copyright: (c) Vadim Zeitlin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -30,7 +30,7 @@ WX_DEFINE_EXPORTED_ARRAY_PTR(wxSpinCtrl *, wxArraySpins);
class WXDLLIMPEXP_CORE wxSpinCtrl : public wxSpinButton
{
public:
wxSpinCtrl() { }
wxSpinCtrl() { Init(); }
wxSpinCtrl(wxWindow *parent,
wxWindowID id = wxID_ANY,
@ -41,6 +41,8 @@ public:
int min = 0, int max = 100, int initial = 0,
const wxString& name = wxT("wxSpinCtrl"))
{
Init();
Create(parent, id, value, pos, size, style, min, max, initial, name);
}
@ -143,6 +145,9 @@ protected:
bool m_blockEvent;
private:
// Common part of all ctors.
void Init();
DECLARE_DYNAMIC_CLASS(wxSpinCtrl)
DECLARE_EVENT_TABLE()
wxDECLARE_NO_COPY_CLASS(wxSpinCtrl);

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 04.04.98
// RCS-ID: $Id: statusbar.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: statusbar.h 70310 2012-01-10 17:01:09Z VZ $
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -76,8 +76,10 @@ protected:
// used by DoUpdateStatusText()
wxClientDC *m_pDC;
#if wxUSE_TOOLTIPS
// the tooltips used when wxSTB_SHOW_TIPS is given
wxVector<wxToolTip*> m_tooltips;
#endif
private:
struct MSWBorders

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id: textctrl.h 65564 2010-09-18 16:26:30Z VZ $
// RCS-ID: $Id: textctrl.h 68450 2011-07-29 15:11:54Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -198,6 +198,8 @@ protected:
virtual void DoSetValue(const wxString &value, int flags = 0);
virtual wxPoint DoPositionToCoords(long pos) const;
// return true if this control has a user-set limit on amount of text (i.e.
// the limit is due to a previous call to SetMaxLength() and not built in)
bool HasSpaceLimit(unsigned int *len) const;

View File

@ -3,7 +3,7 @@
// Purpose: wxMSW-specific wxTextEntry implementation
// Author: Vadim Zeitlin
// Created: 2007-09-26
// RCS-ID: $Id: textentry.h 61834 2009-09-05 12:39:12Z JMS $
// RCS-ID: $Id: textentry.h 68918 2011-08-27 14:11:13Z VZ $
// Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -11,6 +11,8 @@
#ifndef _WX_MSW_TEXTENTRY_H_
#define _WX_MSW_TEXTENTRY_H_
class wxTextAutoCompleteData; // private class used only by wxTextEntry itself
// ----------------------------------------------------------------------------
// wxTextEntry: common part of wxComboBox and (single line) wxTextCtrl
// ----------------------------------------------------------------------------
@ -18,12 +20,8 @@
class WXDLLIMPEXP_CORE wxTextEntry : public wxTextEntryBase
{
public:
wxTextEntry()
{
#if wxUSE_OLE
m_enumStrings = NULL;
#endif // wxUSE_OLE
}
wxTextEntry();
virtual ~wxTextEntry();
// implement wxTextEntryBase pure virtual methods
virtual void WriteText(const wxString& text);
@ -46,13 +44,6 @@ public:
{ DoSetSelection(from, to); }
virtual void GetSelection(long *from, long *to) const;
// auto-completion uses COM under Windows so they won't work without
// wxUSE_OLE as OleInitialize() is not called then
#if wxUSE_OLE
virtual bool AutoComplete(const wxArrayString& choices);
virtual bool AutoCompleteFileNames();
#endif // wxUSE_OLE
virtual bool IsEditable() const;
virtual void SetEditable(bool editable);
@ -80,13 +71,29 @@ protected:
virtual bool DoSetMargins(const wxPoint& pt);
virtual wxPoint DoGetMargins() const;
// auto-completion uses COM under Windows so they won't work without
// wxUSE_OLE as OleInitialize() is not called then
#if wxUSE_OLE
virtual bool DoAutoCompleteStrings(const wxArrayString& choices);
virtual bool DoAutoCompleteFileNames(int flags);
virtual bool DoAutoCompleteCustom(wxTextCompleter *completer);
#endif // wxUSE_OLE
private:
// implement this to return the HWND of the EDIT control
virtual WXHWND GetEditHWND() const = 0;
#if wxUSE_OLE
// enumerator for strings currently used for auto-completion or NULL
class wxIEnumString *m_enumStrings;
// Get the auto-complete object creating it if necessary. Returns NULL if
// creating it failed.
wxTextAutoCompleteData *GetOrCreateCompleter();
// Various auto-completion-related stuff, only used if any of AutoComplete()
// methods are called. Use the function above to access it.
wxTextAutoCompleteData *m_autoCompleteData;
// It needs to call our GetEditableWindow() and GetEditHWND() methods.
friend class wxTextAutoCompleteData;
#endif // wxUSE_OLE
};

View File

@ -5,7 +5,7 @@
// Author: John Norris, minor changes by Axel Schlueter
// Modified by:
// Created: 08.02.01
// RCS-ID: $Id: tglbtn.h 66992 2011-02-22 13:25:30Z VZ $
// RCS-ID: $Id: tglbtn.h 67931 2011-06-14 13:00:42Z VZ $
// Copyright: (c) 2000 Johnny C. Norris II
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -15,71 +15,11 @@
#include "wx/bitmap.h"
//-----------------------------------------------------------------------------
// wxBitmapToggleButton
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxBitmapToggleButton: public wxToggleButtonBase
{
public:
// construction/destruction
wxBitmapToggleButton() { Init(); }
wxBitmapToggleButton(wxWindow *parent,
wxWindowID id,
const wxBitmap& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr)
{
Create(parent, id, label, pos, size, style, validator, name);
}
// Create the control
bool Create(wxWindow *parent,
wxWindowID id,
const wxBitmap& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr);
// Get/set the value
void SetValue(bool state);
bool GetValue() const;
// Set the label
virtual void SetLabel(const wxString& label) { wxControl::SetLabel(label); }
virtual void SetLabel(const wxBitmap& label);
bool Enable(bool enable = true);
protected:
void Init();
wxBitmap m_bitmap;
wxBitmap m_disabledBitmap;
bool m_capturing;
bool m_depressed,m_oldValue;
void OnPaint(wxPaintEvent &event);
void OnMouse(wxMouseEvent &event);
void OnChar(wxKeyEvent &event);
void OnSize(wxSizeEvent &event);
virtual wxSize DoGetBestSize() const;
private:
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxBitmapToggleButton)
};
// Checkbox item (single checkbox)
class WXDLLIMPEXP_CORE wxToggleButton : public wxToggleButtonBase
{
public:
wxToggleButton() {}
wxToggleButton() { Init(); }
wxToggleButton(wxWindow *parent,
wxWindowID id,
const wxString& label,
@ -104,23 +44,68 @@ public:
virtual void SetValue(bool value);
virtual bool GetValue() const ;
virtual void SetLabel(const wxString& label);
virtual bool MSWCommand(WXUINT param, WXWORD id);
virtual void Command(wxCommandEvent& event);
virtual State GetNormalState() const;
// returns true if the platform should explicitly apply a theme border
virtual bool CanApplyThemeBorder() const { return false; }
protected:
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
virtual wxSize DoGetBestSize() const;
virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const;
void Init();
// current state of the button (when owner-drawn)
bool m_state;
private:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxToggleButton)
};
//-----------------------------------------------------------------------------
// wxBitmapToggleButton
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxBitmapToggleButton: public wxToggleButton
{
public:
// construction/destruction
wxBitmapToggleButton() {}
wxBitmapToggleButton(wxWindow *parent,
wxWindowID id,
const wxBitmap& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr)
{
Create(parent, id, label, pos, size, style, validator, name);
}
// Create the control
bool Create(wxWindow *parent,
wxWindowID id,
const wxBitmap& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr);
// deprecated synonym for SetBitmapLabel()
wxDEPRECATED_INLINE( void SetLabel(const wxBitmap& bitmap),
SetBitmapLabel(bitmap); )
// prevent virtual function hiding
virtual void SetLabel(const wxString& label) { wxToggleButton::SetLabel(label); }
private:
DECLARE_DYNAMIC_CLASS(wxBitmapToggleButton)
};
#endif // _WX_TOGGLEBUTTON_H_

View File

@ -0,0 +1,61 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/timectrl.h
// Purpose: wxTimePickerCtrl for Windows.
// Author: Vadim Zeitlin
// Created: 2011-09-22
// RCS-ID: $Id: timectrl.h 69224 2011-09-29 13:43:15Z VZ $
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwindows.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_TIMECTRL_H_
#define _WX_MSW_TIMECTRL_H_
// ----------------------------------------------------------------------------
// wxTimePickerCtrl
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_ADV wxTimePickerCtrl : public wxTimePickerCtrlBase
{
public:
// ctors
wxTimePickerCtrl() { }
wxTimePickerCtrl(wxWindow *parent,
wxWindowID id,
const wxDateTime& dt = wxDefaultDateTime,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTP_DEFAULT,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxTimePickerCtrlNameStr)
{
Create(parent, id, dt, pos, size, style, validator, name);
}
bool Create(wxWindow *parent,
wxWindowID id,
const wxDateTime& dt = wxDefaultDateTime,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTP_DEFAULT,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxTimePickerCtrlNameStr)
{
return MSWCreateDateTimePicker(parent, id, dt,
pos, size, style,
validator, name);
}
// Override MSW-specific functions used during control creation.
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
protected:
virtual wxLocaleInfo MSWGetFormat() const;
virtual bool MSWAllowsNone() const { return false; }
virtual bool MSWOnDateTimeChange(const tagNMDATETIMECHANGE& dtch);
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxTimePickerCtrl);
};
#endif // _WX_MSW_TIMECTRL_H_

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id: toolbar.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: toolbar.h 70854 2012-03-10 00:01:09Z RD $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -85,6 +85,17 @@ public:
virtual WXHBRUSH MSWGetBgBrushForChild(WXHDC hDC, wxWindowMSW *child);
#endif // wxHAS_MSW_BACKGROUND_ERASE_HOOK
virtual wxToolBarToolBase *CreateTool(int id,
const wxString& label,
const wxBitmap& bmpNormal,
const wxBitmap& bmpDisabled = wxNullBitmap,
wxItemKind kind = wxITEM_NORMAL,
wxObject *clientData = NULL,
const wxString& shortHelp = wxEmptyString,
const wxString& longHelp = wxEmptyString);
virtual wxToolBarToolBase *CreateTool(wxControl *control,
const wxString& label);
protected:
// common part of all ctors
void Init();
@ -103,18 +114,6 @@ protected:
virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle);
virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle);
virtual wxToolBarToolBase *CreateTool(int id,
const wxString& label,
const wxBitmap& bmpNormal,
const wxBitmap& bmpDisabled,
wxItemKind kind,
wxObject *clientData,
const wxString& shortHelp,
const wxString& longHelp);
virtual wxToolBarToolBase *CreateTool(wxControl *control,
const wxString& label);
// return the appropriate size and flags for the toolbar control
virtual wxSize DoGetBestSize() const;

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 20.09.01
// RCS-ID: $Id: toplevel.h 65556 2010-09-16 09:05:48Z VS $
// RCS-ID: $Id: toplevel.h 70881 2012-03-12 11:42:49Z JS $
// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -57,12 +57,10 @@ public:
virtual void SetLayoutDirection(wxLayoutDirection dir);
#ifndef __WXWINCE__
virtual bool SetShape(const wxRegion& region);
#endif // __WXWINCE__
virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO);
virtual bool Show(bool show = true);
virtual void Raise();
virtual void ShowWithoutActivating();
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
@ -77,6 +75,19 @@ public:
virtual bool CanSetTransparent();
// MSW-specific methods
// --------------------
// Return the menu representing the "system" menu of the window. You can
// call wxMenu::AppendWhatever() methods on it but removing items from it
// is in general not a good idea.
//
// The pointer returned by this method belongs to the window and will be
// deleted when the window itself is, do not delete it yourself. May return
// NULL if getting the system menu failed.
wxMenu *MSWGetSystemMenu() const;
// implementation from now on
// --------------------------
@ -141,8 +152,6 @@ protected:
virtual void DoFreeze();
virtual void DoThaw();
virtual void DoEnable(bool enable);
// helper of SetIcons(): calls gets the icon with the size specified by the
// given system metrics (SM_C{X|Y}[SM]ICON) from the bundle and sets it
// using WM_SETICON with the specified wParam (ICOM_SMALL or ICON_BIG);
@ -170,7 +179,16 @@ protected:
bool m_fsIsMaximized;
bool m_fsIsShowing;
// the last focused child: we restore focus to it on activation
// Save the current focus to m_winLastFocused if we're not iconized (the
// focus is always NULL when we're iconized).
void DoSaveLastFocus();
// Restore focus to m_winLastFocused if possible and needed.
void DoRestoreLastFocus();
// The last focused child: we remember it when we're deactivated and
// restore focus to it when we're activated (this is done here) or restored
// from iconic state (done by wxFrame).
wxWindow *m_winLastFocused;
#if defined(__SMARTPHONE__) && defined(__WXWINCE__)
@ -214,6 +232,10 @@ private:
void* m_activateInfo;
#endif
// The system menu: initially NULL but can be set (once) by
// MSWGetSystemMenu(). Owned by this window.
wxMenu *m_menuSystem;
DECLARE_EVENT_TABLE()
wxDECLARE_NO_COPY_CLASS(wxTopLevelWindowMSW);
};

View File

@ -0,0 +1,518 @@
/////////////////////////////////////////////////////////////////////////////
// Name: include/wx/msw/webviewie.h
// Purpose: wxMSW IE wxWebView backend
// Author: Marianne Gagnon
// Id: $Id: webview_ie.h 70499 2012-02-02 20:32:08Z SJL $
// Copyright: (c) 2010 Marianne Gagnon, 2011 Steven Lamerton
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef wxWebViewIE_H
#define wxWebViewIE_H
#include "wx/setup.h"
#if wxUSE_WEBVIEW && wxUSE_WEBVIEW_IE && defined(__WXMSW__)
#include "wx/control.h"
#include "wx/webview.h"
#include "wx/msw/ole/automtn.h"
#include "wx/msw/ole/activex.h"
#include "wx/msw/ole/oleutils.h"
#include "wx/msw/wrapwin.h"
#include "wx/msw/missing.h"
#include "wx/sharedptr.h"
#include "wx/vector.h"
/* Classes and definitions from urlmon.h vary in their
* completeness between compilers and versions of compilers.
* We implement our own versions here which should work
* for all compilers. The definitions are taken from the
* mingw-w64 headers which are public domain.
*/
#ifndef REFRESH_NORMAL
#define REFRESH_NORMAL 0
#endif
#ifndef REFRESH_COMPLETELY
#define REFRESH_COMPLETELY 3
#endif
typedef enum __wxMIDL_IBindStatusCallback_0006
{
wxBSCF_FIRSTDATANOTIFICATION = 0x1,
wxBSCF_INTERMEDIATEDATANOTIFICATION = 0x2,
wxBSCF_LASTDATANOTIFICATION = 0x4,
wxBSCF_DATAFULLYAVAILABLE = 0x8,
wxBSCF_AVAILABLEDATASIZEUNKNOWN = 0x10
} wxBSCF;
EXTERN_C const IID CLSID_FileProtocol;
typedef struct _tagwxBINDINFO
{
ULONG cbSize;
LPWSTR szExtraInfo;
STGMEDIUM stgmedData;
DWORD grfBindInfoF;
DWORD dwBindVerb;
LPWSTR szCustomVerb;
DWORD cbstgmedData;
DWORD dwOptions;
DWORD dwOptionsFlags;
DWORD dwCodePage;
SECURITY_ATTRIBUTES securityAttributes;
IID iid;
IUnknown *pUnk;
DWORD dwReserved;
} wxBINDINFO;
typedef struct _tagwxPROTOCOLDATA
{
DWORD grfFlags;
DWORD dwState;
LPVOID pData;
ULONG cbData;
} wxPROTOCOLDATA;
class wxIInternetBindInfo : public IUnknown
{
public:
virtual HRESULT wxSTDCALL GetBindInfo(DWORD *grfBINDF,wxBINDINFO *pbindinfo) = 0;
virtual HRESULT wxSTDCALL GetBindString(ULONG ulStringType,LPOLESTR *ppwzStr,
ULONG cEl,ULONG *pcElFetched) = 0;
};
class wxIInternetProtocolSink : public IUnknown
{
public:
virtual HRESULT wxSTDCALL Switch(wxPROTOCOLDATA *pProtocolData) = 0;
virtual HRESULT wxSTDCALL ReportProgress(ULONG ulStatusCode,
LPCWSTR szStatusText) = 0;
virtual HRESULT wxSTDCALL ReportData(DWORD grfBSCF,ULONG ulProgress,
ULONG ulProgressMax) = 0;
virtual HRESULT wxSTDCALL ReportResult(HRESULT hrResult,DWORD dwError,
LPCWSTR szResult) = 0;
};
class wxIInternetProtocolRoot : public IUnknown
{
public:
virtual HRESULT wxSTDCALL Start(LPCWSTR szUrl,wxIInternetProtocolSink *pOIProtSink,
wxIInternetBindInfo *pOIBindInfo,DWORD grfPI,
HANDLE_PTR dwReserved) = 0;
virtual HRESULT wxSTDCALL Continue(wxPROTOCOLDATA *pProtocolData) = 0;
virtual HRESULT wxSTDCALL Abort(HRESULT hrReason,DWORD dwOptions) = 0;
virtual HRESULT wxSTDCALL Terminate(DWORD dwOptions) = 0;
virtual HRESULT wxSTDCALL Suspend(void) = 0;
virtual HRESULT wxSTDCALL Resume(void) = 0;
};
class wxIInternetProtocol : public wxIInternetProtocolRoot
{
public:
virtual HRESULT wxSTDCALL Read(void *pv,ULONG cb,ULONG *pcbRead) = 0;
virtual HRESULT wxSTDCALL Seek(LARGE_INTEGER dlibMove,DWORD dwOrigin,
ULARGE_INTEGER *plibNewPosition) = 0;
virtual HRESULT wxSTDCALL LockRequest(DWORD dwOptions) = 0;
virtual HRESULT wxSTDCALL UnlockRequest(void) = 0;
};
class wxIInternetSession : public IUnknown
{
public:
virtual HRESULT wxSTDCALL RegisterNameSpace(IClassFactory *pCF,REFCLSID rclsid,
LPCWSTR pwzProtocol,
ULONG cPatterns,
const LPCWSTR *ppwzPatterns,
DWORD dwReserved) = 0;
virtual HRESULT wxSTDCALL UnregisterNameSpace(IClassFactory *pCF,
LPCWSTR pszProtocol) = 0;
virtual HRESULT wxSTDCALL RegisterMimeFilter(IClassFactory *pCF,
REFCLSID rclsid,
LPCWSTR pwzType) = 0;
virtual HRESULT wxSTDCALL UnregisterMimeFilter(IClassFactory *pCF,
LPCWSTR pwzType) = 0;
virtual HRESULT wxSTDCALL CreateBinding(LPBC pBC,LPCWSTR szUrl,
IUnknown *pUnkOuter,IUnknown **ppUnk,
wxIInternetProtocol **ppOInetProt,
DWORD dwOption) = 0;
virtual HRESULT wxSTDCALL SetSessionOption(DWORD dwOption,LPVOID pBuffer,
DWORD dwBufferLength,
DWORD dwReserved) = 0;
virtual HRESULT wxSTDCALL GetSessionOption(DWORD dwOption,LPVOID pBuffer,
DWORD *pdwBufferLength,
DWORD dwReserved) = 0;
};
/* END OF URLMON.H implementation */
/* Same goes for the mshtmhst.h, these are also taken
* from mingw-w64 headers.
*/
typedef enum _tagwxDOCHOSTUIFLAG
{
DOCHOSTUIFLAG_DIALOG = 0x1,
DOCHOSTUIFLAG_DISABLE_HELP_MENU = 0x2,
DOCHOSTUIFLAG_NO3DBORDER = 0x4,
DOCHOSTUIFLAG_SCROLL_NO = 0x8,
DOCHOSTUIFLAG_DISABLE_SCRIPT_INACTIVE = 0x10,
DOCHOSTUIFLAG_OPENNEWWIN = 0x20,
DOCHOSTUIFLAG_DISABLE_OFFSCREEN = 0x40,
DOCHOSTUIFLAG_FLAT_SCROLLBAR = 0x80,
DOCHOSTUIFLAG_DIV_BLOCKDEFAULT = 0x100,
DOCHOSTUIFLAG_ACTIVATE_CLIENTHIT_ONLY = 0x200,
DOCHOSTUIFLAG_OVERRIDEBEHAVIORFACTORY = 0x400,
DOCHOSTUIFLAG_CODEPAGELINKEDFONTS = 0x800,
DOCHOSTUIFLAG_URL_ENCODING_DISABLE_UTF8 = 0x1000,
DOCHOSTUIFLAG_URL_ENCODING_ENABLE_UTF8 = 0x2000,
DOCHOSTUIFLAG_ENABLE_FORMS_AUTOCOMPLETE = 0x4000,
DOCHOSTUIFLAG_ENABLE_INPLACE_NAVIGATION = 0x10000,
DOCHOSTUIFLAG_IME_ENABLE_RECONVERSION = 0x20000,
DOCHOSTUIFLAG_THEME = 0x40000,
DOCHOSTUIFLAG_NOTHEME = 0x80000,
DOCHOSTUIFLAG_NOPICS = 0x100000,
DOCHOSTUIFLAG_NO3DOUTERBORDER = 0x200000,
DOCHOSTUIFLAG_DISABLE_EDIT_NS_FIXUP = 0x400000,
DOCHOSTUIFLAG_LOCAL_MACHINE_ACCESS_CHECK = 0x800000,
DOCHOSTUIFLAG_DISABLE_UNTRUSTEDPROTOCOL = 0x1000000
} DOCHOSTUIFLAG;
typedef struct _tagwxDOCHOSTUIINFO
{
ULONG cbSize;
DWORD dwFlags;
DWORD dwDoubleClick;
OLECHAR *pchHostCss;
OLECHAR *pchHostNS;
} DOCHOSTUIINFO;
class wxIDocHostUIHandler : public IUnknown
{
public:
virtual HRESULT wxSTDCALL ShowContextMenu(DWORD dwID, POINT *ppt,
IUnknown *pcmdtReserved,
IDispatch *pdispReserved) = 0;
virtual HRESULT wxSTDCALL GetHostInfo(DOCHOSTUIINFO *pInfo) = 0;
virtual HRESULT wxSTDCALL ShowUI(DWORD dwID,
IOleInPlaceActiveObject *pActiveObject,
IOleCommandTarget *pCommandTarget,
IOleInPlaceFrame *pFrame,
IOleInPlaceUIWindow *pDoc) = 0;
virtual HRESULT wxSTDCALL HideUI(void) = 0;
virtual HRESULT wxSTDCALL UpdateUI(void) = 0;
virtual HRESULT wxSTDCALL EnableModeless(BOOL fEnable) = 0;
virtual HRESULT wxSTDCALL OnDocWindowActivate(BOOL fActivate) = 0;
virtual HRESULT wxSTDCALL OnFrameWindowActivate(BOOL fActivate) = 0;
virtual HRESULT wxSTDCALL ResizeBorder(LPCRECT prcBorder,
IOleInPlaceUIWindow *pUIWindow,
BOOL fRameWindow) = 0;
virtual HRESULT wxSTDCALL TranslateAccelerator(LPMSG lpMsg,
const GUID *pguidCmdGroup,
DWORD nCmdID) = 0;
virtual HRESULT wxSTDCALL GetOptionKeyPath(LPOLESTR *pchKey,
DWORD dw) = 0;
virtual HRESULT wxSTDCALL GetDropTarget(IDropTarget *pDropTarget,
IDropTarget **ppDropTarget) = 0;
virtual HRESULT wxSTDCALL GetExternal(IDispatch **ppDispatch) = 0;
virtual HRESULT wxSTDCALL TranslateUrl(DWORD dwTranslate,
OLECHAR *pchURLIn,
OLECHAR **ppchURLOut) = 0;
virtual HRESULT wxSTDCALL FilterDataObject(IDataObject *pDO,
IDataObject **ppDORet) = 0;
};
/* END OF MSHTMHST.H implementation */
struct IHTMLDocument2;
class wxFSFile;
class ClassFactory;
class wxIEContainer;
class DocHostUIHandler;
class WXDLLIMPEXP_WEBVIEW wxWebViewIE : public wxWebView
{
public:
wxWebViewIE() {}
wxWebViewIE(wxWindow* parent,
wxWindowID id,
const wxString& url = wxWebViewDefaultURLStr,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxWebViewNameStr)
{
Create(parent, id, url, pos, size, style, name);
}
~wxWebViewIE();
bool Create(wxWindow* parent,
wxWindowID id,
const wxString& url = wxWebViewDefaultURLStr,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxWebViewNameStr);
virtual void LoadURL(const wxString& url);
virtual void LoadHistoryItem(wxSharedPtr<wxWebViewHistoryItem> item);
virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetBackwardHistory();
virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetForwardHistory();
virtual bool CanGoForward() const;
virtual bool CanGoBack() const;
virtual void GoBack();
virtual void GoForward();
virtual void ClearHistory();
virtual void EnableHistory(bool enable = true);
virtual void Stop();
virtual void Reload(wxWebViewReloadFlags flags = wxWEB_VIEW_RELOAD_DEFAULT);
virtual wxString GetPageSource() const;
virtual wxString GetPageText() const;
virtual bool IsBusy() const;
virtual wxString GetCurrentURL() const;
virtual wxString GetCurrentTitle() const;
virtual void SetZoomType(wxWebViewZoomType);
virtual wxWebViewZoomType GetZoomType() const;
virtual bool CanSetZoomType(wxWebViewZoomType) const;
virtual void Print();
virtual void SetPage(const wxString& html, const wxString& baseUrl);
virtual wxWebViewZoom GetZoom() const;
virtual void SetZoom(wxWebViewZoom zoom);
//Clipboard functions
virtual bool CanCut() const;
virtual bool CanCopy() const;
virtual bool CanPaste() const;
virtual void Cut();
virtual void Copy();
virtual void Paste();
//Undo / redo functionality
virtual bool CanUndo() const;
virtual bool CanRedo() const;
virtual void Undo();
virtual void Redo();
//Editing functions
virtual void SetEditable(bool enable = true);
virtual bool IsEditable() const;
//Selection
virtual void SelectAll();
virtual bool HasSelection() const;
virtual void DeleteSelection();
virtual wxString GetSelectedText() const;
virtual wxString GetSelectedSource() const;
virtual void ClearSelection();
virtual void RunScript(const wxString& javascript);
//Virtual Filesystem Support
virtual void RegisterHandler(wxSharedPtr<wxWebViewHandler> handler);
// ---- IE-specific methods
// FIXME: I seem to be able to access remote webpages even in offline mode...
bool IsOfflineMode();
void SetOfflineMode(bool offline);
wxWebViewZoom GetIETextZoom() const;
void SetIETextZoom(wxWebViewZoom level);
wxWebViewZoom GetIEOpticalZoom() const;
void SetIEOpticalZoom(wxWebViewZoom level);
void onActiveXEvent(wxActiveXEvent& evt);
void onEraseBg(wxEraseEvent&) {}
DECLARE_EVENT_TABLE();
private:
wxIEContainer* m_container;
wxAutomationObject m_ie;
IWebBrowser2* m_webBrowser;
DWORD m_dwCookie;
DocHostUIHandler* m_uiHandler;
//We store the current zoom type;
wxWebViewZoomType m_zoomType;
/** The "Busy" property of IWebBrowser2 does not always return busy when
* we'd want it to; this variable may be set to true in cases where the
* Busy property is false but should be true.
*/
bool m_isBusy;
//We manage our own history, the history list contains the history items
//which are added as documentcomplete events arrive, unless we are loading
//an item from the history. The position is stored as an int, and reflects
//where we are in the history list.
wxVector<wxSharedPtr<wxWebViewHistoryItem> > m_historyList;
wxVector<ClassFactory*> m_factories;
int m_historyPosition;
bool m_historyLoadingFromList;
bool m_historyEnabled;
//Generic helper functions for IHtmlDocument commands
bool CanExecCommand(wxString command) const;
void ExecCommand(wxString command);
IHTMLDocument2* GetDocument() const;
//Toggles control features see INTERNETFEATURELIST for values.
bool EnableControlFeature(long flag, bool enable = true);
wxDECLARE_DYNAMIC_CLASS(wxWebViewIE);
};
class VirtualProtocol : public wxIInternetProtocol
{
protected:
wxIInternetProtocolSink* m_protocolSink;
wxString m_html;
VOID * fileP;
wxFSFile* m_file;
wxSharedPtr<wxWebViewHandler> m_handler;
public:
VirtualProtocol(wxSharedPtr<wxWebViewHandler> handler);
~VirtualProtocol() {}
//IUnknown
DECLARE_IUNKNOWN_METHODS;
//IInternetProtocolRoot
HRESULT STDMETHODCALLTYPE Abort(HRESULT WXUNUSED(hrReason),
DWORD WXUNUSED(dwOptions))
{ return E_NOTIMPL; }
HRESULT STDMETHODCALLTYPE Continue(wxPROTOCOLDATA *WXUNUSED(pProtocolData))
{ return S_OK; }
HRESULT STDMETHODCALLTYPE Resume() { return S_OK; }
HRESULT STDMETHODCALLTYPE Start(LPCWSTR szUrl,
wxIInternetProtocolSink *pOIProtSink,
wxIInternetBindInfo *pOIBindInfo,
DWORD grfPI,
HANDLE_PTR dwReserved);
HRESULT STDMETHODCALLTYPE Suspend() { return S_OK; }
HRESULT STDMETHODCALLTYPE Terminate(DWORD WXUNUSED(dwOptions)) { return S_OK; }
//IInternetProtocol
HRESULT STDMETHODCALLTYPE LockRequest(DWORD WXUNUSED(dwOptions))
{ return S_OK; }
HRESULT STDMETHODCALLTYPE Read(void *pv, ULONG cb, ULONG *pcbRead);
HRESULT STDMETHODCALLTYPE Seek(LARGE_INTEGER WXUNUSED(dlibMove),
DWORD WXUNUSED(dwOrigin),
ULARGE_INTEGER* WXUNUSED(plibNewPosition))
{ return E_FAIL; }
HRESULT STDMETHODCALLTYPE UnlockRequest() { return S_OK; }
};
class ClassFactory : public IClassFactory
{
public:
ClassFactory(wxSharedPtr<wxWebViewHandler> handler) : m_handler(handler) {}
//IClassFactory
HRESULT STDMETHODCALLTYPE CreateInstance(IUnknown* pUnkOuter,
REFIID riid, void** ppvObject);
HRESULT STDMETHODCALLTYPE LockServer(BOOL fLock);
//IUnknown
DECLARE_IUNKNOWN_METHODS;
private:
wxSharedPtr<wxWebViewHandler> m_handler;
};
class wxIEContainer : public wxActiveXContainer
{
public:
wxIEContainer(wxWindow *parent, REFIID iid, IUnknown *pUnk, DocHostUIHandler* uiHandler = NULL);
virtual ~wxIEContainer();
virtual bool QueryClientSiteInterface(REFIID iid, void **_interface, const char *&desc);
private:
DocHostUIHandler* m_uiHandler;
};
class DocHostUIHandler : public wxIDocHostUIHandler
{
public:
DocHostUIHandler() {};
~DocHostUIHandler() {};
virtual HRESULT wxSTDCALL ShowContextMenu(DWORD dwID, POINT *ppt,
IUnknown *pcmdtReserved,
IDispatch *pdispReserved);
virtual HRESULT wxSTDCALL GetHostInfo(DOCHOSTUIINFO *pInfo);
virtual HRESULT wxSTDCALL ShowUI(DWORD dwID,
IOleInPlaceActiveObject *pActiveObject,
IOleCommandTarget *pCommandTarget,
IOleInPlaceFrame *pFrame,
IOleInPlaceUIWindow *pDoc);
virtual HRESULT wxSTDCALL HideUI(void);
virtual HRESULT wxSTDCALL UpdateUI(void);
virtual HRESULT wxSTDCALL EnableModeless(BOOL fEnable);
virtual HRESULT wxSTDCALL OnDocWindowActivate(BOOL fActivate);
virtual HRESULT wxSTDCALL OnFrameWindowActivate(BOOL fActivate);
virtual HRESULT wxSTDCALL ResizeBorder(LPCRECT prcBorder,
IOleInPlaceUIWindow *pUIWindow,
BOOL fRameWindow);
virtual HRESULT wxSTDCALL TranslateAccelerator(LPMSG lpMsg,
const GUID *pguidCmdGroup,
DWORD nCmdID);
virtual HRESULT wxSTDCALL GetOptionKeyPath(LPOLESTR *pchKey,
DWORD dw);
virtual HRESULT wxSTDCALL GetDropTarget(IDropTarget *pDropTarget,
IDropTarget **ppDropTarget);
virtual HRESULT wxSTDCALL GetExternal(IDispatch **ppDispatch);
virtual HRESULT wxSTDCALL TranslateUrl(DWORD dwTranslate,
OLECHAR *pchURLIn,
OLECHAR **ppchURLOut);
virtual HRESULT wxSTDCALL FilterDataObject(IDataObject *pDO,
IDataObject **ppDORet);
//IUnknown
DECLARE_IUNKNOWN_METHODS;
};
#endif // wxUSE_WEBVIEW && wxUSE_WEBVIEW_IE && defined(__WXMSW__)
#endif // wxWebViewIE_H

View File

@ -0,0 +1,31 @@
/////////////////////////////////////////////////////////////////////////////
// Name: include/wx/msw/webviewhistoryitem.h
// Purpose: wxWebViewHistoryItem header for MSW
// Author: Steven Lamerton
// Id: $Id: webviewhistoryitem_ie.h 69074 2011-09-12 18:35:39Z SJL $
// Copyright: (c) 2011 Steven Lamerton
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_WEBVIEWHISTORYITEM_H_
#define _WX_MSW_WEBVIEWHISTORYITEM_H_
#include "wx/setup.h"
#if wxUSE_WEBVIEW && wxUSE_WEBVIEW_IE && defined(__WXMSW__)
class WXDLLIMPEXP_WEBVIEW wxWebViewHistoryItem
{
public:
wxWebViewHistoryItem(const wxString& url, const wxString& title) :
m_url(url), m_title(title) {}
wxString GetUrl() { return m_url; }
wxString GetTitle() { return m_title; }
private:
wxString m_url, m_title;
};
#endif // wxUSE_WEBVIEW && wxUSE_WEBVIEW_IE && defined(__WXMSW__)
#endif // _WX_MSW_WEBVIEWHISTORYITEM_H_

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id: setup.h 67062 2011-02-27 12:48:07Z VZ $
// RCS-ID: $Id: setup.h 69463 2011-10-18 21:57:02Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -201,15 +201,6 @@
// Recommended setting: 0 (this is still work in progress...)
#define wxUSE_EXTENDED_RTTI 0
// Set wxUSE_STL to 1 to derive wxList(Foo) and wxArray(Foo) from
// std::list<Foo*> and std::vector<Foo*>, with a compatibility interface,
// and for wxHashMap to be implemented with templates.
//
// Default is 0
//
// Recommended setting: YMMV
#define wxUSE_STL 0
// Support for message/error logging. This includes wxLogXXX() functions and
// wxLog and derived classes. Don't set this to 0 unless you really know what
// you are doing.
@ -261,44 +252,6 @@
// Recommended setting: 1 as setting it to 0 disables many other things
#define wxUSE_STREAMS 1
// This is not a real option but is used as the default value for
// wxUSE_STD_IOSTREAM and wxUSE_STD_STRING.
//
// Currently the Digital Mars and Watcom compilers come without standard C++
// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have
// them (e.g. from STLPort).
//
// VC++ 5.0 does include standard C++ library headers, however they produce
// many warnings that can't be turned off when compiled at warning level 4.
#if defined(__DMC__) || defined(__WATCOMC__) \
|| (defined(_MSC_VER) && _MSC_VER < 1200)
#define wxUSE_STD_DEFAULT 0
#else
#define wxUSE_STD_DEFAULT 1
#endif
// Use standard C++ streams if 1 instead of wx streams in some places. If
// disabled (default), wx streams are used everywhere and wxWidgets doesn't
// depend on the standard streams library.
//
// Notice that enabling this does not replace wx streams with std streams
// everywhere, in a lot of places wx streams are used no matter what.
//
// Default is 0
//
// Recommended setting: 1 if you use the standard streams anyhow and so
// dependency on the standard streams library is not a
// problem
#define wxUSE_STD_IOSTREAM wxUSE_STD_DEFAULT
// Enable conversion to standard C++ string if 1.
//
// Default is 1 for most compilers.
//
// Recommended setting: 1 unless you want to ensure your program doesn't use
// the standard C++ library at all.
#define wxUSE_STD_STRING wxUSE_STD_DEFAULT
// Support for positional parameters (e.g. %1$d, %2$s ...) in wxVsnprintf.
// Note that if the system's implementation does not support positional
// parameters, setting this to 1 forces the use of the wxWidgets implementation
@ -314,6 +267,107 @@
// Recommended setting: 1 if you want to support multiple languages
#define wxUSE_PRINTF_POS_PARAMS 1
// ----------------------------------------------------------------------------
// Interoperability with the standard library.
// ----------------------------------------------------------------------------
// Set wxUSE_STL to 1 to enable maximal interoperability with the standard
// library, even at the cost of backwards compatibility.
//
// Default is 0
//
// Recommended setting: 0 as the options below already provide a relatively
// good level of interoperability and changing this option arguably isn't worth
// diverging from the official builds of the library.
#define wxUSE_STL 0
// This is not a real option but is used as the default value for
// wxUSE_STD_IOSTREAM, wxUSE_STD_STRING and wxUSE_STD_CONTAINERS.
//
// Currently the Digital Mars and Watcom compilers come without standard C++
// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have
// them (e.g. from STLPort).
//
// VC++ 5.0 does include standard C++ library headers, however they produce
// many warnings that can't be turned off when compiled at warning level 4.
#if defined(__DMC__) || defined(__WATCOMC__) \
|| (defined(_MSC_VER) && _MSC_VER < 1200)
#define wxUSE_STD_DEFAULT 0
#else
#define wxUSE_STD_DEFAULT 1
#endif
// Use standard C++ containers to implement wxVector<>, wxStack<>, wxDList<>
// and wxHashXXX<> classes. If disabled, wxWidgets own (mostly compatible but
// usually more limited) implementations are used which allows to avoid the
// dependency on the C++ run-time library.
//
// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't
// support using standard containers and that VC6 needs non-default options for
// such build to avoid getting "fatal error C1076: compiler limit : internal
// heap limit reached; use /Zm to specify a higher limit" in its own standard
// headers, so you need to ensure you do increase the heap size before enabling
// this option for this compiler.
//
// Default is 0 for compatibility reasons.
//
// Recommended setting: 1 unless compatibility with the official wxWidgets
// build and/or the existing code is a concern.
#define wxUSE_STD_CONTAINERS 0
// Use standard C++ streams if 1 instead of wx streams in some places. If
// disabled, wx streams are used everywhere and wxWidgets doesn't depend on the
// standard streams library.
//
// Notice that enabling this does not replace wx streams with std streams
// everywhere, in a lot of places wx streams are used no matter what.
//
// Default is 1 if compiler supports it.
//
// Recommended setting: 1 if you use the standard streams anyhow and so
// dependency on the standard streams library is not a
// problem
#define wxUSE_STD_IOSTREAM wxUSE_STD_DEFAULT
// Enable minimal interoperability with the standard C++ string class if 1.
// "Minimal" means that wxString can be constructed from std::string or
// std::wstring but can't be implicitly converted to them. You need to enable
// the option below for the latter.
//
// Default is 1 for most compilers.
//
// Recommended setting: 1 unless you want to ensure your program doesn't use
// the standard C++ library at all.
#define wxUSE_STD_STRING wxUSE_STD_DEFAULT
// Make wxString as much interchangeable with std::[w]string as possible, in
// particular allow implicit conversion of wxString to either of these classes.
// This comes at a price (or a benefit, depending on your point of view) of not
// allowing implicit conversion to "const char *" and "const wchar_t *".
//
// Because a lot of existing code relies on these conversions, this option is
// disabled by default but can be enabled for your build if you don't care
// about compatibility.
//
// Default is 0 if wxUSE_STL has its default value or 1 if it is enabled.
//
// Recommended setting: 0 to remain compatible with the official builds of
// wxWidgets.
#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL
// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix
// them. Set this option to 1 to use <iostream.h>, 0 to use <iostream>.
//
// Note that newer compilers (including VC++ 7.1 and later) don't support
// wxUSE_IOSTREAMH == 1 and so <iostream> will be used anyhow.
//
// Default is 0.
//
// Recommended setting: 0, only set to 1 if you use a really old compiler
#define wxUSE_IOSTREAMH 0
// ----------------------------------------------------------------------------
// non GUI features selection
// ----------------------------------------------------------------------------
@ -651,6 +705,34 @@
// Recommended setting: 1
#define wxUSE_STC 1
// Use wxWidget's web viewing classes
//
// Default is 1
//
// Recommended setting: 1
#define wxUSE_WEBVIEW 1
// Use the IE wxWebView backend
//
// Default is 1 on MSW
//
// Recommended setting: 1
#ifdef __WXMSW__
#define wxUSE_WEBVIEW_IE 1
#else
#define wxUSE_WEBVIEW_IE 0
#endif
// Use the WebKit wxWebView backend
//
// Default is 1 on GTK and OSX
//
// Recommended setting: 1
#if defined(__WXGTK__) || defined(__WXOSX__)
#define wxUSE_WEBVIEW_WEBKIT 1
#else
#define wxUSE_WEBVIEW_WEBKIT 0
#endif
// Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced
// 2D drawing API. (Still somewhat experimental)
@ -749,6 +831,7 @@
//
// Recommended setting: 1
#define wxUSE_ANIMATIONCTRL 1 // wxAnimationCtrl
#define wxUSE_BANNERWINDOW 1 // wxBannerWindow
#define wxUSE_BUTTON 1 // wxButton
#define wxUSE_BMPBUTTON 1 // wxBitmapButton
#define wxUSE_CALENDARCTRL 1 // wxCalendarCtrl
@ -784,8 +867,10 @@
#define wxUSE_STATTEXT 1 // wxStaticText
#define wxUSE_STATBMP 1 // wxStaticBitmap
#define wxUSE_TEXTCTRL 1 // wxTextCtrl
#define wxUSE_TIMEPICKCTRL 1 // wxTimePickerCtrl
#define wxUSE_TOGGLEBTN 1 // requires wxButton
#define wxUSE_TREECTRL 1 // wxTreeCtrl
#define wxUSE_TREELISTCTRL 1 // wxTreeListCtrl
// Use a status bar class? Depending on the value of wxUSE_NATIVE_STATUSBAR
// below either wxStatusBar95 or a generic wxStatusBar will be used.
@ -1002,6 +1087,14 @@
// Recommended setting: 1
#define wxUSE_NOTIFICATION_MESSAGE 1
// wxRichToolTip is a customizable tooltip class which has more functionality
// than the stock (but native, unlike this class) wxToolTip.
//
// Default is 1.
//
// Recommended setting: 1 (but can be safely set to 0 if you don't need it)
#define wxUSE_RICHTOOLTIP 1
// Use wxSashWindow class.
//
// Default is 1.
@ -1307,28 +1400,15 @@
// to create files in SVG (Scalable Vector Graphics) format.
#define wxUSE_SVG 1
// ----------------------------------------------------------------------------
// other compiler (mis)features
// ----------------------------------------------------------------------------
// Set this to 0 if your compiler can't cope with omission of prototype
// parameters.
// Should wxDC provide SetTransformMatrix() and related methods?
//
// Default is 1.
// Default is 1 but can be set to 0 if this functionality is not used. Notice
// that currently only wxMSW supports this so setting this to 0 doesn't change
// much for non-MSW platforms (although it will still save a few bytes
// probably).
//
// Recommended setting: 1 (should never need to set this to 0)
#define REMOVE_UNUSED_ARG 1
// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix
// them. Set this option to 1 to use <iostream.h>, 0 to use <iostream>.
//
// Note that newer compilers (including VC++ 7.1 and later) don't support
// wxUSE_IOSTREAMH == 1 and so <iostream> will be used anyhow.
//
// Default is 0.
//
// Recommended setting: 0, only set to 1 if you use a really old compiler
#define wxUSE_IOSTREAMH 0
// Recommended setting: 1.
#define wxUSE_DC_TRANSFORM_MATRIX 1
// ----------------------------------------------------------------------------
// image format support

View File

@ -5,7 +5,7 @@
// Modified by: Vadim Zeitlin on 13.05.99: complete refont of message handling,
// elimination of Default(), ...
// Created: 01/02/97
// RCS-ID: $Id: window.h 67250 2011-03-20 00:00:29Z VZ $
// RCS-ID: $Id: window.h 69348 2011-10-09 22:01:57Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -366,7 +366,21 @@ public:
bool HandlePower(WXWPARAM wParam, WXLPARAM lParam, bool *vetoed);
// Window procedure
// The main body of common window proc for all wxWindow objects. It tries
// to handle the given message and returns true if it was handled (the
// appropriate return value is then put in result, which must be non-NULL)
// or false if it wasn't.
//
// This function should be overridden in any new code instead of
// MSWWindowProc() even if currently most of the code overrides
// MSWWindowProc() as it had been written before this function was added.
virtual bool MSWHandleMessage(WXLRESULT *result,
WXUINT message,
WXWPARAM wParam,
WXLPARAM lParam);
// Common Window procedure for all wxWindow objects: forwards to
// MSWHandleMessage() and MSWDefWindowProc() if the message wasn't handled.
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
// Calls an appropriate default window procedure
@ -453,7 +467,13 @@ public:
// This should be overridden to return true for the controls which have
// themed background that should through their children. Currently only
// wxNotebook uses this.
virtual bool MSWHasInheritableBackground() const { return false; }
//
// The base class version already returns true if we have a solid
// background colour that should be propagated to our children.
virtual bool MSWHasInheritableBackground() const
{
return InheritsBackgroundColour();
}
#if !defined(__WXWINCE__) && !defined(__WXUNIVERSAL__)
#define wxHAS_MSW_BACKGROUND_ERASE_HOOK
@ -599,6 +619,14 @@ protected:
WXWPARAM wParam,
WXLPARAM lParam = 0) const;
// Another helper for creating wxKeyEvent for wxEVT_CHAR and related types.
//
// The wParam and lParam here must come from WM_CHAR event parameters, i.e.
// wParam must be a character and not a virtual code.
wxKeyEvent CreateCharEvent(wxEventType evType,
WXWPARAM wParam,
WXLPARAM lParam) const;
// default OnEraseBackground() implementation, return true if we did erase
// the background, false otherwise (i.e. the system should erase it)

View File

@ -3,7 +3,7 @@
// Purpose: Wrapper around <windows.h>, to be included instead of it
// Author: Vaclav Slavik
// Created: 2003/07/22
// RCS-ID: $Id: wrapwin.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: wrapwin.h 69784 2011-11-17 16:43:34Z VZ $
// Copyright: (c) 2003 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -80,6 +80,7 @@
#if (!defined(_MSC_VER) || (_MSC_VER < 1300)) && !defined(__WIN64__)
#define UINT_PTR unsigned int
#define INT_PTR int
#define HANDLE_PTR unsigned long
#define LONG_PTR long
#define ULONG_PTR unsigned long
#define DWORD_PTR unsigned long