Add definition for a general-purpose action menu item.
This commit is contained in:
@@ -200,6 +200,7 @@ Application Debugger :
|
|||||||
VariablesView.cpp
|
VariablesView.cpp
|
||||||
|
|
||||||
# user_interface/gui/util
|
# user_interface/gui/util
|
||||||
|
ActionMenuItem.cpp
|
||||||
GUISettingsUtils.cpp
|
GUISettingsUtils.cpp
|
||||||
SettingsMenu.cpp
|
SettingsMenu.cpp
|
||||||
TargetAddressTableColumn.cpp
|
TargetAddressTableColumn.cpp
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2012, Rene Gollent, [email protected].
|
||||||
|
* Copyright 2009, Ingo Weinhold, [email protected].
|
||||||
|
* Distributed under the terms of the MIT License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "ActionMenuItem.h"
|
||||||
|
|
||||||
|
#include <new>
|
||||||
|
|
||||||
|
#include <Looper.h>
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark - ActionMenuItem
|
||||||
|
|
||||||
|
|
||||||
|
ActionMenuItem::ActionMenuItem(const char* label, BMessage* message,
|
||||||
|
char shortcut, uint32 modifiers)
|
||||||
|
:
|
||||||
|
BMenuItem(label, message, shortcut, modifiers)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ActionMenuItem::ActionMenuItem(BMenu* menu, BMessage* message)
|
||||||
|
:
|
||||||
|
BMenuItem(menu, message)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ActionMenuItem::~ActionMenuItem()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
ActionMenuItem::PrepareToShow(BLooper* parentLooper, BHandler* targetHandler)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
ActionMenuItem::Finish(BLooper* parentLooper, BHandler* targetHandler,
|
||||||
|
bool force)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
ActionMenuItem::ItemSelected()
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2012, Rene Gollent, [email protected].
|
||||||
|
* Copyright 2009, Ingo Weinhold, [email protected].
|
||||||
|
* Distributed under the terms of the MIT License.
|
||||||
|
*/
|
||||||
|
#ifndef ACTION_MENU_ITEM_H
|
||||||
|
#define ACTION_MENU_ITEM_H
|
||||||
|
|
||||||
|
|
||||||
|
#include <MenuItem.h>
|
||||||
|
|
||||||
|
|
||||||
|
class ActionMenuItem : public BMenuItem {
|
||||||
|
public:
|
||||||
|
ActionMenuItem(const char* label,
|
||||||
|
BMessage* message, char shortcut = 0,
|
||||||
|
uint32 modifiers = 0);
|
||||||
|
ActionMenuItem(BMenu* menu,
|
||||||
|
BMessage* message = NULL);
|
||||||
|
virtual ~ActionMenuItem();
|
||||||
|
|
||||||
|
virtual void PrepareToShow(BLooper* parentLooper,
|
||||||
|
BHandler* targetHandler);
|
||||||
|
virtual bool Finish(BLooper* parentLooper,
|
||||||
|
BHandler* targetHandler, bool force);
|
||||||
|
|
||||||
|
virtual void ItemSelected();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ACTION_MENU_ITEM_H
|
||||||
Reference in New Issue
Block a user