partially applied patch #895170: "Building with minimal setup.h - continuation"
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
0063a4dce6
commit
0b4f47a319
@ -14,15 +14,11 @@
|
|||||||
|
|
||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
|
|
||||||
#if wxUSE_BUTTON
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxButton flags
|
// wxButton flags shared with other classes
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// These two flags are obsolete
|
#if wxUSE_TOGGLEBTN || wxUSE_BUTTON
|
||||||
#define wxBU_NOAUTODRAW 0x0000
|
|
||||||
#define wxBU_AUTODRAW 0x0004
|
|
||||||
|
|
||||||
// These flags affect label alignment
|
// These flags affect label alignment
|
||||||
#define wxBU_LEFT 0x0040
|
#define wxBU_LEFT 0x0040
|
||||||
@ -30,6 +26,18 @@
|
|||||||
#define wxBU_RIGHT 0x0100
|
#define wxBU_RIGHT 0x0100
|
||||||
#define wxBU_BOTTOM 0x0200
|
#define wxBU_BOTTOM 0x0200
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if wxUSE_BUTTON
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// wxButton specific flags
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// These two flags are obsolete
|
||||||
|
#define wxBU_NOAUTODRAW 0x0000
|
||||||
|
#define wxBU_AUTODRAW 0x0004
|
||||||
|
|
||||||
// by default, the buttons will be created with some (system dependent)
|
// by default, the buttons will be created with some (system dependent)
|
||||||
// minimal size to make them look nicer, giving this style will make them as
|
// minimal size to make them look nicer, giving this style will make them as
|
||||||
// small as possible
|
// small as possible
|
||||||
|
@ -946,6 +946,17 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif /* controls */
|
#endif /* controls */
|
||||||
|
|
||||||
|
#if wxUSE_BMPBUTTON
|
||||||
|
# if !wxUSE_BUTTON
|
||||||
|
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||||
|
# error "wxUSE_BMPBUTTON requires wxUSE_BUTTON"
|
||||||
|
# else
|
||||||
|
# undef wxUSE_BUTTON
|
||||||
|
# define wxUSE_BUTTON 1
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif /* wxUSE_BMPBUTTON */
|
||||||
|
|
||||||
#if wxUSE_NOTEBOOK || wxUSE_LISTBOOK
|
#if wxUSE_NOTEBOOK || wxUSE_LISTBOOK
|
||||||
# if defined(wxUSE_BOOKCTRL) && !wxUSE_BOOKCTRL
|
# if defined(wxUSE_BOOKCTRL) && !wxUSE_BOOKCTRL
|
||||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||||
@ -1201,6 +1212,17 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif /* wxUSE_RADIOBTN */
|
#endif /* wxUSE_RADIOBTN */
|
||||||
|
|
||||||
|
#if wxUSE_HELP
|
||||||
|
# if !wxUSE_BMPBUTTON
|
||||||
|
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||||
|
# error "wxUSE_HELP requires wxUSE_BMPBUTTON"
|
||||||
|
# else
|
||||||
|
# undef wxUSE_BMPBUTTON
|
||||||
|
# define wxUSE_BMPBUTTON 1
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif /* wxUSE_HELP */
|
||||||
|
|
||||||
#if wxUSE_WXHTML_HELP
|
#if wxUSE_WXHTML_HELP
|
||||||
# if !wxUSE_HELP || !wxUSE_HTML || !wxUSE_COMBOBOX || !wxUSE_NOTEBOOK
|
# if !wxUSE_HELP || !wxUSE_HTML || !wxUSE_COMBOBOX || !wxUSE_NOTEBOOK
|
||||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||||
@ -1378,6 +1400,25 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif /* wxUSE_FILEDLG */
|
#endif /* wxUSE_FILEDLG */
|
||||||
|
|
||||||
|
#if !wxUSE_BUTTON
|
||||||
|
# if wxUSE_PROGRESSDLG || \
|
||||||
|
wxUSE_FONTDLG || \
|
||||||
|
wxUSE_FILEDLG || \
|
||||||
|
wxUSE_CHOICEDLG || \
|
||||||
|
wxUSE_NUMBERDLG || \
|
||||||
|
wxUSE_TEXTDLG || \
|
||||||
|
wxUSE_DIRDLG || \
|
||||||
|
wxUSE_STARTUP_TIPS || \
|
||||||
|
wxUSE_WIZARDDLG
|
||||||
|
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||||
|
# error "Common and generic dialogs require wxUSE_BUTTON"
|
||||||
|
# else
|
||||||
|
# undef wxUSE_BUTTON
|
||||||
|
# define wxUSE_BUTTON 1
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif /* wxUSE_PROGRESSDLG */
|
||||||
|
|
||||||
#if !wxUSE_TOOLBAR
|
#if !wxUSE_TOOLBAR
|
||||||
# if wxUSE_TOOLBAR_NATIVE
|
# if wxUSE_TOOLBAR_NATIVE
|
||||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||||
@ -1444,12 +1485,14 @@
|
|||||||
#endif /* wxUSE_LOGWINDOW */
|
#endif /* wxUSE_LOGWINDOW */
|
||||||
|
|
||||||
#if wxUSE_LOG_DIALOG
|
#if wxUSE_LOG_DIALOG
|
||||||
# if !wxUSE_LISTCTRL
|
# if !wxUSE_LISTCTRL || !wxUSE_BUTTON
|
||||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||||
# error "wxUSE_LOG_DIALOG requires wxUSE_LISTCTRL"
|
# error "wxUSE_LOG_DIALOG requires wxUSE_LISTCTRL and wxUSE_BUTTON"
|
||||||
# else
|
# else
|
||||||
# undef wxUSE_LISTCTRL
|
# undef wxUSE_LISTCTRL
|
||||||
# define wxUSE_LISTCTRL 1
|
# define wxUSE_LISTCTRL 1
|
||||||
|
# undef wxUSE_BUTTON
|
||||||
|
# define wxUSE_BUTTON 1
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#endif /* wxUSE_LOG_DIALOG */
|
#endif /* wxUSE_LOG_DIALOG */
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
#ifndef _WX_CHOICDLG_H_BASE_
|
#ifndef _WX_CHOICDLG_H_BASE_
|
||||||
#define _WX_CHOICDLG_H_BASE_
|
#define _WX_CHOICDLG_H_BASE_
|
||||||
|
|
||||||
|
#if wxUSE_CHOICEDLG
|
||||||
|
|
||||||
#include "wx/generic/choicdgg.h"
|
#include "wx/generic/choicdgg.h"
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// _WX_CHOICDLG_H_BASE_
|
// _WX_CHOICDLG_H_BASE_
|
||||||
|
@ -18,6 +18,24 @@
|
|||||||
|
|
||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// common constants for use in wxUSE_LOG/!wxUSE_LOG
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// the trace masks have been superceded by symbolic trace constants, they're
|
||||||
|
// for compatibility only andwill be removed soon - do NOT use them
|
||||||
|
|
||||||
|
// meaning of different bits of the trace mask (which allows selectively
|
||||||
|
// enable/disable some trace messages)
|
||||||
|
#define wxTraceMemAlloc 0x0001 // trace memory allocation (new/delete)
|
||||||
|
#define wxTraceMessages 0x0002 // trace window messages/X callbacks
|
||||||
|
#define wxTraceResAlloc 0x0004 // trace GDI resource allocation
|
||||||
|
#define wxTraceRefCount 0x0008 // trace various ref counting operations
|
||||||
|
|
||||||
|
#ifdef __WXMSW__
|
||||||
|
#define wxTraceOleCalls 0x0100 // OLE interface calls
|
||||||
|
#endif
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// types
|
// types
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@ -93,20 +111,6 @@ enum
|
|||||||
#define wxTRACE_OleCalls wxT("ole") // OLE interface calls
|
#define wxTRACE_OleCalls wxT("ole") // OLE interface calls
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// the trace masks have been superceded by symbolic trace constants, they're
|
|
||||||
// for compatibility only andwill be removed soon - do NOT use them
|
|
||||||
|
|
||||||
// meaning of different bits of the trace mask (which allows selectively
|
|
||||||
// enable/disable some trace messages)
|
|
||||||
#define wxTraceMemAlloc 0x0001 // trace memory allocation (new/delete)
|
|
||||||
#define wxTraceMessages 0x0002 // trace window messages/X callbacks
|
|
||||||
#define wxTraceResAlloc 0x0004 // trace GDI resource allocation
|
|
||||||
#define wxTraceRefCount 0x0008 // trace various ref counting operations
|
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
|
||||||
#define wxTraceOleCalls 0x0100 // OLE interface calls
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/iosfwrap.h"
|
#include "wx/iosfwrap.h"
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@ -444,9 +448,6 @@ extern void expdecl wxVLog##level(arg, const wxChar *szFormat, \
|
|||||||
va_list argptr); \
|
va_list argptr); \
|
||||||
extern void expdecl wxLog##level(arg, const wxChar *szFormat, \
|
extern void expdecl wxLog##level(arg, const wxChar *szFormat, \
|
||||||
...) ATTRIBUTE_PRINTF_2
|
...) ATTRIBUTE_PRINTF_2
|
||||||
#define DECLARE_LOG_FUNCTION2(level, arg) \
|
|
||||||
DECLARE_LOG_FUNCTION2_EXP(level, arg, WXDLLIMPEXP_BASE)
|
|
||||||
|
|
||||||
#else // !wxUSE_LOG
|
#else // !wxUSE_LOG
|
||||||
|
|
||||||
// log functions do nothing at all
|
// log functions do nothing at all
|
||||||
@ -454,7 +455,7 @@ extern void expdecl wxLog##level(arg, const wxChar *szFormat, \
|
|||||||
inline void wxVLog##level(const wxChar *szFormat, \
|
inline void wxVLog##level(const wxChar *szFormat, \
|
||||||
va_list argptr) { } \
|
va_list argptr) { } \
|
||||||
inline void wxLog##level(const wxChar *szFormat, ...) { }
|
inline void wxLog##level(const wxChar *szFormat, ...) { }
|
||||||
#define DECLARE_LOG_FUNCTION2(level, arg) \
|
#define DECLARE_LOG_FUNCTION2_EXP(level, arg, expdecl) \
|
||||||
inline void wxVLog##level(arg, const wxChar *szFormat, \
|
inline void wxVLog##level(arg, const wxChar *szFormat, \
|
||||||
va_list argptr) {} \
|
va_list argptr) {} \
|
||||||
inline void wxLog##level(arg, const wxChar *szFormat, ...) { }
|
inline void wxLog##level(arg, const wxChar *szFormat, ...) { }
|
||||||
@ -474,6 +475,9 @@ public:
|
|||||||
#define wxTRACE_OleCalls wxEmptyString // OLE interface calls
|
#define wxTRACE_OleCalls wxEmptyString // OLE interface calls
|
||||||
|
|
||||||
#endif // wxUSE_LOG/!wxUSE_LOG
|
#endif // wxUSE_LOG/!wxUSE_LOG
|
||||||
|
#define DECLARE_LOG_FUNCTION2(level, arg) \
|
||||||
|
DECLARE_LOG_FUNCTION2_EXP(level, arg, WXDLLIMPEXP_BASE)
|
||||||
|
|
||||||
|
|
||||||
// a generic function for all levels (level is passes as parameter)
|
// a generic function for all levels (level is passes as parameter)
|
||||||
DECLARE_LOG_FUNCTION2(Generic, wxLogLevel level);
|
DECLARE_LOG_FUNCTION2(Generic, wxLogLevel level);
|
||||||
@ -492,6 +496,7 @@ DECLARE_LOG_FUNCTION(Status);
|
|||||||
|
|
||||||
#if wxUSE_GUI
|
#if wxUSE_GUI
|
||||||
// this one is the same as previous except that it allows to explicitly
|
// this one is the same as previous except that it allows to explicitly
|
||||||
|
class wxFrame;
|
||||||
// specify the frame to which the output should go
|
// specify the frame to which the output should go
|
||||||
DECLARE_LOG_FUNCTION2_EXP(Status, wxFrame *pFrame, WXDLLIMPEXP_CORE);
|
DECLARE_LOG_FUNCTION2_EXP(Status, wxFrame *pFrame, WXDLLIMPEXP_CORE);
|
||||||
#endif // wxUSE_GUI
|
#endif // wxUSE_GUI
|
||||||
|
@ -2570,9 +2570,11 @@ wxAccStatus wxWindowAccessible::GetName(int childId, wxString* name)
|
|||||||
// This will eventually be replaced by specialised
|
// This will eventually be replaced by specialised
|
||||||
// accessible classes, one for each kind of wxWidgets
|
// accessible classes, one for each kind of wxWidgets
|
||||||
// control or window.
|
// control or window.
|
||||||
|
#if wxUSE_BUTTON
|
||||||
if (GetWindow()->IsKindOf(CLASSINFO(wxButton)))
|
if (GetWindow()->IsKindOf(CLASSINFO(wxButton)))
|
||||||
title = ((wxButton*) GetWindow())->GetLabel();
|
title = ((wxButton*) GetWindow())->GetLabel();
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
title = GetWindow()->GetName();
|
title = GetWindow()->GetName();
|
||||||
|
|
||||||
if (!title.IsEmpty())
|
if (!title.IsEmpty())
|
||||||
|
@ -543,6 +543,7 @@ bool wxHtmlHelpData::AddBookParam(const wxFSFile& bookfile,
|
|||||||
// Now store the contents range
|
// Now store the contents range
|
||||||
bookr->SetContentsRange(cont_start, m_ContentsCnt);
|
bookr->SetContentsRange(cont_start, m_ContentsCnt);
|
||||||
|
|
||||||
|
#if wxUSE_FONTMAP
|
||||||
// Convert encoding, if neccessary:
|
// Convert encoding, if neccessary:
|
||||||
if (encoding != wxFONTENCODING_SYSTEM)
|
if (encoding != wxFONTENCODING_SYSTEM)
|
||||||
{
|
{
|
||||||
@ -559,6 +560,11 @@ bool wxHtmlHelpData::AddBookParam(const wxFSFile& bookfile,
|
|||||||
conv.Convert(m_Contents[i].m_Name);
|
conv.Convert(m_Contents[i].m_Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
wxUnusedVar(IndexOld);
|
||||||
|
wxUnusedVar(ContentsOld);
|
||||||
|
wxASSERT_MSG(encoding == wxFONTENCODING_SYSTEM, wxT("Encoding can't be converted"));
|
||||||
|
#endif
|
||||||
|
|
||||||
m_BookRecords.Add(bookr);
|
m_BookRecords.Add(bookr);
|
||||||
if (m_IndexCnt > 0)
|
if (m_IndexCnt > 0)
|
||||||
|
@ -665,7 +665,7 @@ bool wxClipboard::AddData( wxDataObject *data )
|
|||||||
{
|
{
|
||||||
#if 1
|
#if 1
|
||||||
// TODO
|
// TODO
|
||||||
wxLogError("Not implemented because wxMetafileDataObject does not contain width and height values.");
|
wxLogError(wxT("Not implemented because wxMetafileDataObject does not contain width and height values."));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
#else
|
#else
|
||||||
wxMetafileDataObject* metaFileDataObject =
|
wxMetafileDataObject* metaFileDataObject =
|
||||||
|
@ -242,12 +242,16 @@ HRESULT WINAPI wxDDEnumModesCallback(LPDDSURFACEDESC lpDDSurfaceDesc,
|
|||||||
// initialize gs_displays using DirectX functions
|
// initialize gs_displays using DirectX functions
|
||||||
static bool DoInitDirectX()
|
static bool DoInitDirectX()
|
||||||
{
|
{
|
||||||
|
#if wxUSE_LOG
|
||||||
// suppress the errors if ddraw.dll is not found
|
// suppress the errors if ddraw.dll is not found
|
||||||
wxLog::EnableLogging(false);
|
wxLog::EnableLogging(false);
|
||||||
|
#endif
|
||||||
|
|
||||||
wxDynamicLibrary dllDX(_T("ddraw.dll"));
|
wxDynamicLibrary dllDX(_T("ddraw.dll"));
|
||||||
|
|
||||||
wxLog::EnableLogging(true);
|
#if wxUSE_LOG
|
||||||
|
wxLog::EnableLogging();
|
||||||
|
#endif
|
||||||
|
|
||||||
if ( !dllDX.IsLoaded() )
|
if ( !dllDX.IsLoaded() )
|
||||||
return false;
|
return false;
|
||||||
|
@ -130,11 +130,15 @@ wxSize wxToggleButton::DoGetBestSize() const
|
|||||||
// the button height is proportional to the height of the font used
|
// the button height is proportional to the height of the font used
|
||||||
int hBtn = BUTTON_HEIGHT_FROM_CHAR_HEIGHT(hChar);
|
int hBtn = BUTTON_HEIGHT_FROM_CHAR_HEIGHT(hChar);
|
||||||
|
|
||||||
|
#if wxUSE_BUTTON
|
||||||
wxSize sz = wxButton::GetDefaultSize();
|
wxSize sz = wxButton::GetDefaultSize();
|
||||||
if (wBtn > sz.x)
|
if (wBtn > sz.x)
|
||||||
sz.x = wBtn;
|
sz.x = wBtn;
|
||||||
if (hBtn > sz.y)
|
if (hBtn > sz.y)
|
||||||
sz.y = hBtn;
|
sz.y = hBtn;
|
||||||
|
#else
|
||||||
|
wxSize sz(wBtn, hBtn);
|
||||||
|
#endif
|
||||||
|
|
||||||
return sz;
|
return sz;
|
||||||
}
|
}
|
||||||
|
@ -1905,8 +1905,8 @@ bool wxWindowMSW::MSWProcessMessage(WXMSG* pMsg)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else // no default button
|
else // no default button
|
||||||
{
|
|
||||||
#endif // wxUSE_BUTTON
|
#endif // wxUSE_BUTTON
|
||||||
|
{
|
||||||
// this is a quick and dirty test for a text
|
// this is a quick and dirty test for a text
|
||||||
// control
|
// control
|
||||||
if ( !(lDlgCode & DLGC_HASSETSEL) )
|
if ( !(lDlgCode & DLGC_HASSETSEL) )
|
||||||
@ -2346,9 +2346,11 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l
|
|||||||
#ifndef __WXWINCE__
|
#ifndef __WXWINCE__
|
||||||
case WM_PRINT:
|
case WM_PRINT:
|
||||||
{
|
{
|
||||||
|
#if wxUSE_LISTCTRL
|
||||||
// Don't call the wx handlers in this case
|
// Don't call the wx handlers in this case
|
||||||
if ( wxIsKindOf(this, wxListCtrl) )
|
if ( wxIsKindOf(this, wxListCtrl) )
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
if ( lParam & PRF_ERASEBKGND )
|
if ( lParam & PRF_ERASEBKGND )
|
||||||
HandleEraseBkgnd((WXHDC)(HDC)wParam);
|
HandleEraseBkgnd((WXHDC)(HDC)wParam);
|
||||||
@ -5794,6 +5796,8 @@ bool wxWindowMSW::UnregisterHotKey(int hotkeyId)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_ACCEL
|
||||||
|
|
||||||
bool wxWindowMSW::HandleHotKey(WXWPARAM wParam, WXLPARAM lParam)
|
bool wxWindowMSW::HandleHotKey(WXWPARAM wParam, WXLPARAM lParam)
|
||||||
{
|
{
|
||||||
int hotkeyId = wParam;
|
int hotkeyId = wParam;
|
||||||
@ -5810,6 +5814,8 @@ bool wxWindowMSW::HandleHotKey(WXWPARAM wParam, WXLPARAM lParam)
|
|||||||
return GetEventHandler()->ProcessEvent(event);
|
return GetEventHandler()->ProcessEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_ACCEL
|
||||||
|
|
||||||
#endif // wxUSE_HOTKEY
|
#endif // wxUSE_HOTKEY
|
||||||
|
|
||||||
// Not tested under WinCE
|
// Not tested under WinCE
|
||||||
|
@ -4543,7 +4543,9 @@ private:
|
|||||||
|
|
||||||
wxWin32FrameInputHandler *m_inputHnd;
|
wxWin32FrameInputHandler *m_inputHnd;
|
||||||
wxTopLevelWindow *m_wnd;
|
wxTopLevelWindow *m_wnd;
|
||||||
|
#if wxUSE_ACCEL
|
||||||
wxAcceleratorTable m_oldAccelTable;
|
wxAcceleratorTable m_oldAccelTable;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
wxWin32SystemMenuEvtHandler::wxWin32SystemMenuEvtHandler(
|
wxWin32SystemMenuEvtHandler::wxWin32SystemMenuEvtHandler(
|
||||||
@ -4560,6 +4562,7 @@ void wxWin32SystemMenuEvtHandler::Attach(wxInputConsumer *consumer)
|
|||||||
m_wnd = wxStaticCast(consumer->GetInputWindow(), wxTopLevelWindow);
|
m_wnd = wxStaticCast(consumer->GetInputWindow(), wxTopLevelWindow);
|
||||||
m_wnd->PushEventHandler(this);
|
m_wnd->PushEventHandler(this);
|
||||||
|
|
||||||
|
#if wxUSE_ACCEL
|
||||||
// VS: This code relies on using generic implementation of
|
// VS: This code relies on using generic implementation of
|
||||||
// wxAcceleratorTable in wxUniv!
|
// wxAcceleratorTable in wxUniv!
|
||||||
wxAcceleratorTable table = *m_wnd->GetAcceleratorTable();
|
wxAcceleratorTable table = *m_wnd->GetAcceleratorTable();
|
||||||
@ -4567,13 +4570,16 @@ void wxWin32SystemMenuEvtHandler::Attach(wxInputConsumer *consumer)
|
|||||||
table.Add(wxAcceleratorEntry(wxACCEL_ALT, WXK_SPACE, wxID_SYSTEM_MENU));
|
table.Add(wxAcceleratorEntry(wxACCEL_ALT, WXK_SPACE, wxID_SYSTEM_MENU));
|
||||||
table.Add(wxAcceleratorEntry(wxACCEL_ALT, WXK_F4, wxID_CLOSE_FRAME));
|
table.Add(wxAcceleratorEntry(wxACCEL_ALT, WXK_F4, wxID_CLOSE_FRAME));
|
||||||
m_wnd->SetAcceleratorTable(table);
|
m_wnd->SetAcceleratorTable(table);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWin32SystemMenuEvtHandler::Detach()
|
void wxWin32SystemMenuEvtHandler::Detach()
|
||||||
{
|
{
|
||||||
if ( m_wnd )
|
if ( m_wnd )
|
||||||
{
|
{
|
||||||
|
#if wxUSE_ACCEL
|
||||||
m_wnd->SetAcceleratorTable(m_oldAccelTable);
|
m_wnd->SetAcceleratorTable(m_oldAccelTable);
|
||||||
|
#endif
|
||||||
m_wnd->RemoveEventHandler(this);
|
m_wnd->RemoveEventHandler(this);
|
||||||
m_wnd = NULL;
|
m_wnd = NULL;
|
||||||
}
|
}
|
||||||
@ -4595,10 +4601,16 @@ void wxWin32SystemMenuEvtHandler::OnSystemMenu(wxCommandEvent &WXUNUSED(event))
|
|||||||
pt.x = -pt.x + border;
|
pt.x = -pt.x + border;
|
||||||
pt.y = -pt.y + border + FRAME_TITLEBAR_HEIGHT;
|
pt.y = -pt.y + border + FRAME_TITLEBAR_HEIGHT;
|
||||||
|
|
||||||
|
#if wxUSE_ACCEL
|
||||||
wxAcceleratorTable table = *m_wnd->GetAcceleratorTable();
|
wxAcceleratorTable table = *m_wnd->GetAcceleratorTable();
|
||||||
m_wnd->SetAcceleratorTable(wxNullAcceleratorTable);
|
m_wnd->SetAcceleratorTable(wxNullAcceleratorTable);
|
||||||
|
#endif
|
||||||
|
|
||||||
m_inputHnd->PopupSystemMenu(m_wnd, pt);
|
m_inputHnd->PopupSystemMenu(m_wnd, pt);
|
||||||
|
|
||||||
|
#if wxUSE_ACCEL
|
||||||
m_wnd->SetAcceleratorTable(table);
|
m_wnd->SetAcceleratorTable(table);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWin32SystemMenuEvtHandler::OnCloseFrame(wxCommandEvent &WXUNUSED(event))
|
void wxWin32SystemMenuEvtHandler::OnCloseFrame(wxCommandEvent &WXUNUSED(event))
|
||||||
|
Loading…
Reference in New Issue
Block a user