Fix rebase error.

Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77618 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Bryan Petty
2014-09-10 14:54:20 +00:00
parent 30015f9cfe
commit 6795b5c1af
7 changed files with 15 additions and 158 deletions

View File

@@ -12,7 +12,7 @@
#define _WX_FRAME_H_
#if wxUSE_TASKBARBUTTON
class WXDLLIMPEXP_FWD_ADV wxTaskBarButton;
class WXDLLIMPEXP_FWD_CORE wxTaskBarButton;
#endif
class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase
@@ -40,6 +40,9 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr);
#if wxUSE_TASKBARBUTTON
virtual ~wxFrame();
#endif
// implement base class pure virtuals
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
@@ -179,7 +182,7 @@ private:
bool m_wasMinimized;
#if wxUSE_TASKBARBUTTON
wxTaskBarButton *m_taskBarButton;
wxTaskBarButton* m_taskBarButton;
#endif
DECLARE_EVENT_TABLE()

View File

@@ -14,6 +14,7 @@
#include "wx/defs.h"
#include "wx/vector.h"
#include "wx/taskbarbutton.h"
namespace {
class ITaskbarList3;

View File

@@ -121,22 +121,6 @@ public:
// returns true if the platform should explicitly apply a theme border
virtual bool CanApplyThemeBorder() const { return false; }
#if wxUSE_MENUS && !defined(__WXUNIVERSAL__)
bool HandleMenuSelect(WXWORD nItem, WXWORD nFlags, WXHMENU hMenu);
// 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);
// Find the menu corresponding to the given handle.
virtual wxMenu* MSWFindMenuFromHMENU(WXHMENU hMenu);
#endif // wxUSE_MENUS && !__WXUNIVERSAL__
protected:
// common part of all ctors
void Init();
@@ -251,10 +235,6 @@ private:
// MSWGetSystemMenu(). Owned by this window.
wxMenu *m_menuSystem;
// The number of currently opened menus: 0 initially, 1 when a top level
// menu is opened, 2 when its submenu is opened and so on.
int m_menuDepth;
DECLARE_EVENT_TABLE()
wxDECLARE_NO_COPY_CLASS(wxTopLevelWindowMSW);
};

View File

@@ -27,7 +27,6 @@ class WXDLLIMPEXP_FWD_CORE ICustomDestinationList;
class WXDLLIMPEXP_FWD_CORE IApplicationDocumentLists;
}
/**
State of the task bar button.
*/
@@ -255,10 +254,6 @@ private:
bool m_frequent_visible;
};
#if defined(__WXMSW__)
#include "wx/msw/taskbarbutton.h"
#endif
#endif // wxUSE_TASKBARBUTTON
#endif // _WX_TASKBARBUTTON_H_

View File

@@ -57,7 +57,7 @@
#endif // __WXUNIVERSAL__
#if wxUSE_TASKBARBUTTON
#include "wx/taskbarbutton.h"
#include "wx/msw/taskbarbutton.h"
#include "wx/dynlib.h"
WXUINT wxMsgTaskbarButtonCreated = 0;
@@ -182,17 +182,13 @@ bool wxFrame::Create(wxWindow *parent,
return true;
}
#if wxUSE_TASKBARBUTTON
wxFrame::~wxFrame()
{
SendDestroyEvent();
DeleteAllBars();
#if wxUSE_TASKBARBUTTON
if ( m_taskBarButton )
delete m_taskBarButton;
#endif
}
#endif
// ----------------------------------------------------------------------------
// wxFrame client size calculations

View File

@@ -22,7 +22,7 @@
#if wxUSE_TASKBARBUTTON
#include "wx/msw/private.h"
#include "wx/taskbarbutton.h"
#include "wx/msw/taskbarbutton.h"
#include <shlwapi.h>
#include <initguid.h>
@@ -209,14 +209,16 @@ public:
};
#ifdef wxUSE_UNICODE
#define IShellLink IShellLinkW
#define IShellLink ::IShellLinkW
DEFINE_GUID(wxIID_IShellLink,
0x000214F9, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
#else
#define IShellLink IShellLinkA
#define IShellLink ::IShellLinkA
DEFINE_GUID(wxIID_IShellLink,
0x000214EE, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
#endif
#endif // wxUSE_UNICODE
typedef enum _SIGDN

View File

@@ -63,15 +63,6 @@
#define ICON_SMALL 0
#endif
// ----------------------------------------------------------------------------
// globals
// ----------------------------------------------------------------------------
#if wxUSE_MENUS || wxUSE_MENUS_NATIVE
extern wxMenu *wxCurrentPopupMenu;
#endif // wxUSE_MENUS || wxUSE_MENUS_NATIVE
// ----------------------------------------------------------------------------
// stubs for missing functions under MicroWindows
// ----------------------------------------------------------------------------
@@ -1443,117 +1434,6 @@ void wxTopLevelWindowMSW::OnActivate(wxActivateEvent& event)
}
}
#if wxUSE_MENUS && !defined(__WXUNIVERSAL__)
bool
wxTopLevelWindowMSW::HandleMenuSelect(WXWORD nItem, WXWORD flags, WXHMENU hMenu)
{
// Ignore the special messages generated when the menu is closed (this is
// the only case when the flags are set to -1), in particular don't clear
// the help string in the status bar when this happens as it had just been
// restored by the base class code.
if ( !hMenu && flags == 0xffff )
return false;
// Unfortunately we also need to ignore another message which is sent after
// closing the currently active submenu of the menu bar by pressing Escape:
// in this case we get WM_UNINITMENUPOPUP, from which we generate
// wxEVT_MENU_CLOSE, and _then_ we get WM_MENUSELECT for the top level menu
// from which we overwrite the help string just restored by OnMenuClose()
// handler in wxFrameBase. To prevent this from happening we discard these
// messages but only in the case it's really the top level menu as we still
// need to clear the help string when a submenu is selected in a menu.
if ( flags == (MF_POPUP | MF_HILITE) && !m_menuDepth )
return false;
// sign extend to int from unsigned short we get from Windows
int item = (signed short)nItem;
// WM_MENUSELECT is generated for both normal items and menus, including
// the top level menus of the menu bar, which can't be represented using
// any valid identifier in wxMenuEvent so use an otherwise unused value for
// them
if ( flags & (MF_POPUP | MF_SEPARATOR) )
item = wxID_NONE;
wxMenuEvent event(wxEVT_MENU_HIGHLIGHT, item);
event.SetEventObject(this);
if ( HandleWindowEvent(event) )
return true;
// by default, i.e. if the event wasn't handled above, clear the status bar
// text when an item which can't have any associated help string in wx API
// is selected
if ( item == wxID_NONE )
DoGiveHelp(wxEmptyString, true);
return false;
}
bool
wxTopLevelWindowMSW::DoSendMenuOpenCloseEvent(wxEventType evtType, wxMenu* menu, bool popup)
{
// Update the menu depth when dealing with the top level menus.
if ( !popup )
{
if ( evtType == wxEVT_MENU_OPEN )
{
m_menuDepth++;
}
else if ( evtType == wxEVT_MENU_CLOSE )
{
wxASSERT_MSG( m_menuDepth > 0, wxS("No open menus?") );
m_menuDepth--;
}
else
{
wxFAIL_MSG( wxS("Unexpected menu event type") );
}
}
wxMenuEvent event(evtType, popup ? wxID_ANY : 0, menu);
event.SetEventObject(menu);
return HandleWindowEvent(event);
}
bool wxTopLevelWindowMSW::HandleExitMenuLoop(WXWORD isPopup)
{
return DoSendMenuOpenCloseEvent(wxEVT_MENU_CLOSE,
isPopup ? wxCurrentPopupMenu : NULL,
isPopup != 0);
}
bool wxTopLevelWindowMSW::HandleMenuPopup(wxEventType evtType, WXHMENU hMenu)
{
bool isPopup = false;
wxMenu* menu = NULL;
if ( wxCurrentPopupMenu && wxCurrentPopupMenu->GetHMenu() == hMenu )
{
menu = wxCurrentPopupMenu;
isPopup = true;
}
else
{
menu = MSWFindMenuFromHMENU(hMenu);
}
return DoSendMenuOpenCloseEvent(evtType, menu, isPopup);
}
wxMenu* wxTopLevelWindowMSW::MSWFindMenuFromHMENU(WXHMENU WXUNUSED(hMenu))
{
// We don't have any menus at this level.
return NULL;
}
#endif // wxUSE_MENUS && !__WXUNIVERSAL__
// the DialogProc for all wxWidgets dialogs
LONG APIENTRY _EXPORT
wxDlgProc(HWND hDlg,