mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-18 14:56:07 +00:00
Move XFE_RDFPopupMenu in PopupMenu.(cpp|h)
so the toolbars can use it too.
This commit is contained in:
parent
f919eae25a
commit
f4b1652435
@ -276,3 +276,35 @@ XFE_SimplePopupMenu::PushButtonActivate(Widget w, XtPointer userData)
|
|||||||
{
|
{
|
||||||
; // Do nothing for now.
|
; // Do nothing for now.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// RDFPopupMenu
|
||||||
|
//
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
XFE_RDFPopupMenu::XFE_RDFPopupMenu(String name, Widget parent,
|
||||||
|
HT_View view,
|
||||||
|
Boolean isWorkspace, Boolean isBackground)
|
||||||
|
: XFE_SimplePopupMenu(name, parent)
|
||||||
|
{
|
||||||
|
m_pane = HT_GetPane(view);
|
||||||
|
|
||||||
|
HT_Cursor cursor = HT_NewContextualMenuCursor(view,
|
||||||
|
isWorkspace, isBackground);
|
||||||
|
HT_MenuCmd command;
|
||||||
|
while(HT_NextContextMenuItem(cursor, &command))
|
||||||
|
{
|
||||||
|
if (command == HT_CMD_SEPARATOR)
|
||||||
|
addSeparator();
|
||||||
|
else
|
||||||
|
addPushButton(HT_GetMenuCmdName(command), (XtPointer)command,
|
||||||
|
HT_IsMenuCmdEnabled(m_pane, command));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
XFE_RDFPopupMenu::PushButtonActivate(Widget /* w */, XtPointer userData)
|
||||||
|
{
|
||||||
|
HT_DoMenuCmd(m_pane, (HT_MenuCmd)(int)userData);
|
||||||
|
}
|
||||||
|
@ -27,6 +27,8 @@
|
|||||||
|
|
||||||
#include "Menu.h"
|
#include "Menu.h"
|
||||||
|
|
||||||
|
#include "htrdf.h" // For HT_View for XFE_RDFPopupMenu
|
||||||
|
|
||||||
class XFE_PopupMenuBase
|
class XFE_PopupMenuBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -75,4 +77,18 @@ public:
|
|||||||
|
|
||||||
virtual void PushButtonActivate(Widget w, XtPointer userData);
|
virtual void PushButtonActivate(Widget w, XtPointer userData);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class XFE_RDFPopupMenu : public XFE_SimplePopupMenu
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
XFE_RDFPopupMenu(String name, Widget parent,
|
||||||
|
HT_View view,
|
||||||
|
Boolean isWorkspace, Boolean isBackground);
|
||||||
|
|
||||||
|
void PushButtonActivate(Widget w, XtPointer userData);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
HT_Pane m_pane;
|
||||||
|
};
|
||||||
|
|
||||||
#endif /* _xfe_popupmenu_h */
|
#endif /* _xfe_popupmenu_h */
|
||||||
|
@ -32,20 +32,6 @@
|
|||||||
#include "IconGroup.h"
|
#include "IconGroup.h"
|
||||||
#include "htrdf.h"
|
#include "htrdf.h"
|
||||||
#include "NavCenterView.h"
|
#include "NavCenterView.h"
|
||||||
#include "PopupMenu.h"
|
|
||||||
|
|
||||||
class XFE_RDFPopupMenu : public XFE_SimplePopupMenu
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
XFE_RDFPopupMenu(String name, Widget parent,
|
|
||||||
HT_View view,
|
|
||||||
Boolean isWorkspace, Boolean isBackground);
|
|
||||||
|
|
||||||
void PushButtonActivate(Widget w, XtPointer userData);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
HT_Pane m_pane;
|
|
||||||
};
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
class XFE_ColumnData
|
class XFE_ColumnData
|
||||||
@ -58,6 +44,7 @@ public:
|
|||||||
uint32 token_type;
|
uint32 token_type;
|
||||||
};
|
};
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
class XFE_RDFPopupMenu;
|
||||||
|
|
||||||
class XFE_RDFTreeView : public XFE_View,
|
class XFE_RDFTreeView : public XFE_View,
|
||||||
public XFE_RDFBase
|
public XFE_RDFBase
|
||||||
|
Loading…
x
Reference in New Issue
Block a user