Qt 4.8
|
#include "qmenu.h"
#include "qhash.h"
#include <qdebug.h>
#include "qapplication.h"
#include <private/qt_mac_p.h>
#include "qregexp.h"
#include "qmainwindow.h"
#include "qdockwidget.h"
#include "qtoolbar.h"
#include "qevent.h"
#include "qstyle.h"
#include "qwidgetaction.h"
#include "qmacnativewidget_mac.h"
#include <private/qapplication_p.h>
#include <private/qcocoaapplication_mac_p.h>
#include <private/qmenu_p.h>
#include <private/qmenubar_p.h>
#include <private/qcocoamenuloader_mac_p.h>
#include <private/qcocoamenu_mac_p.h>
#include <private/qt_cocoa_helpers_mac_p.h>
#include <Cocoa/Cocoa.h>
Go to the source code of this file.
Typedefs | |
typedef QMultiHash< OSMenuRef, EventHandlerRef > | EventHandlerHash |
typedef QHash< QWidget *, QMenuBar * > | MenuBarHash |
Enumerations | |
enum | { kMenuPropertyQAction = 'QAcT', kMenuPropertyQWidget = 'QWId', kMenuPropertyCausedQWidget = 'QCAU', kMenuPropertyMergeMenu = 'QApP', kMenuPropertyMergeList = 'QAmL', kMenuPropertyWidgetActionWidget = 'QWid', kMenuPropertyWidgetMenu = 'QWMe', kHICommandAboutQt = 'AOQT', kHICommandCustomMerge = 'AQt0' } |
Variables | |
static QMenuBar * | fallback = 0 |
const UInt32 | kMenuCreatorQt = 'cute' |
QWidget * | mac_keyboard_grabber |
static EventHandlerRef | mac_menu_event_handler = 0 |
static EventHandlerUPP | mac_menu_eventUPP = 0 |
static EventTypeSpec | menu_events [] |
static EventTypeSpec | menu_menu_events [] |
struct { | |
bool modal | |
QPointer< QMenuBar > qmenubar | |
} | qt_mac_current_menubar = { 0, false } |
static uint | qt_mac_menu_static_cmd_id = 'QT00' |
int | qt_mac_menus_open_count = 0 |
bool | qt_mac_no_menubar_merge = false |
bool | qt_mac_quit_menu_item_enabled = true |
static EventTypeSpec | widget_in_menu_events [] |
typedef QMultiHash<OSMenuRef, EventHandlerRef> EventHandlerHash |
Definition at line 302 of file qmenu_mac.mm.
typedef QHash<QWidget *, QMenuBar *> MenuBarHash |
Definition at line 1615 of file qmenu_mac.mm.
anonymous enum |
Definition at line 83 of file qmenu_mac.mm.
|
static |
Definition at line 194 of file qmenu_mac.mm.
Referenced by qt_mac_get_accel(), and QMenuBarPrivate::QMacMenuBarPrivate::syncAction().
|
static |
Definition at line 178 of file qmenu_mac.mm.
Referenced by QMenuBarPrivate::macDestroyMenuBar(), and QMenuBarPrivate::macUpdateMenuBarImmediatly().
Definition at line 145 of file qmenu_mac.mm.
Referenced by keySequenceModifierMask(), and qt_mac_get_accel().
Definition at line 1989 of file qmenu_mac.mm.
Referenced by QMenuBarPrivate::macUpdateMenuBarImmediatly().
|
static |
Definition at line 1970 of file qmenu_mac.mm.
Referenced by QMenuBarPrivate::macUpdateMenuBarImmediatly().
NSUInteger keySequenceModifierMask | ( | const QKeySequence & | accel | ) |
Definition at line 1265 of file qmenu_mac.mm.
Referenced by QMenuPrivate::QMacMenuPrivate::syncAction().
NSString* keySequenceToKeyEqivalent | ( | const QKeySequence & | accel | ) |
Definition at line 1254 of file qmenu_mac.mm.
Referenced by QMenuPrivate::QMacMenuPrivate::syncAction().
bool qt_mac_activate_action | ( | MenuRef | menu, |
uint | command, | ||
QAction::ActionEvent | action_e, | ||
bool | by_accel | ||
) |
Definition at line 209 of file qmenu_mac.mm.
Referenced by qt_mac_menu_event().
|
static |
Definition at line 563 of file qmenu_mac.mm.
Referenced by QMenuPrivate::QMacMenuPrivate::addAction().
|
static |
void qt_mac_clear_menubar | ( | ) |
Definition at line 2015 of file qmenu_mac.mm.
Referenced by QMenuBarPrivate::macUpdateMenuBarImmediatly(), and QMenuBar::setNativeMenuBar().
|
static |
Definition at line 547 of file qmenu_mac.mm.
Referenced by QMenuPrivate::QMacMenuPrivate::addAction(), qt_mac_clear_menubar(), qt_mac_set_modal_state(), and QMenuPrivate::QMacMenuPrivate::removeAction().
|
static |
Definition at line 1109 of file qpixmap_mac.cpp.
Referenced by QMenuPrivate::QMacMenuPrivate::syncAction().
Definition at line 2193 of file qmenu_mac.mm.
Referenced by QMenuBarPrivate::macMenu(), and QMenuPrivate::macMenu().
|
inlinestatic |
Definition at line 534 of file qmenu_mac.mm.
Referenced by qt_mac_create_menu().
void qt_mac_dispose_rgn | ( | RgnHandle | r | ) |
Referenced by qt_mac_widget_in_menu_eventHandler().
Definition at line 568 of file qmenu_mac.mm.
Referenced by QMenuPrivate::QMacMenuPrivate::syncAction().
RgnHandle qt_mac_get_rgn | ( | ) |
Referenced by qt_mac_widget_in_menu_eventHandler().
HIViewRef qt_mac_hiview_for | ( | OSWindowRef | w | ) |
Definition at line 1910 of file qmenu_mac.mm.
Referenced by qt_mac_should_disable_menu().
OSStatus qt_mac_menu_event | ( | EventHandlerCallRef | er, |
EventRef | event, | ||
void * | |||
) |
Definition at line 397 of file qmenu_mac.mm.
Referenced by qt_mac_create_menu(), and qt_mac_create_menu_event_handler().
|
static |
Definition at line 287 of file qmenu_mac.mm.
Referenced by QMenuPrivate::QMacMenuPrivate::addAction(), qt_mac_menu_event(), qt_mac_menu_find_action(), QMenuBarPrivate::QMacMenuBarPrivate::removeAction(), QMenuPrivate::QMacMenuPrivate::removeAction(), QMenuBarPrivate::QMacMenuBarPrivate::syncAction(), and QMenuPrivate::QMacMenuPrivate::syncAction().
|
static |
Definition at line 297 of file qmenu_mac.mm.
|
static |
Definition at line 955 of file qmenu_mac.mm.
Referenced by QMenuPrivate::QMacMenuPrivate::syncAction().
|
static |
Definition at line 779 of file qmenu_mac.mm.
Referenced by QMenuPrivate::QMacMenuPrivate::addAction().
|
static |
Definition at line 920 of file qmenu_mac.mm.
Referenced by QMenuPrivate::QMacMenuPrivate::syncAction().
bool qt_mac_menubar_is_open | ( | ) |
Definition at line 750 of file qmenu_mac.mm.
Referenced by QKeyMapperPrivate::translateKeyEvent().
void Q_GUI_EXPORT qt_mac_set_menubar_icons | ( | bool | b | ) |
Definition at line 977 of file qmenu_mac.mm.
void Q_GUI_EXPORT qt_mac_set_menubar_merge | ( | bool | b | ) |
Definition at line 981 of file qmenu_mac.mm.
|
static |
Definition at line 701 of file qmenu_mac.mm.
Referenced by QMenuBarPrivate::macUpdateMenuBarImmediatly(), and qt_mac_clear_menubar().
Definition at line 652 of file qmenu_mac.mm.
Referenced by qt_mac_set_modal_state().
void Q_GUI_EXPORT qt_mac_set_native_menubar | ( | bool | b | ) |
Definition at line 979 of file qmenu_mac.mm.
|
static |
Definition at line 1929 of file qmenu_mac.mm.
Referenced by QMenuBarPrivate::macUpdateMenuBarImmediatly(), and qt_mac_clear_menubar().
bool qt_mac_watchingAboutToShow | ( | QMenu * | menu | ) |
Definition at line 119 of file qmenu_mac.mm.
Referenced by actualMenuItemVisibility().
|
static |
Definition at line 312 of file qmenu_mac.mm.
Referenced by QMenuPrivate::QMacMenuPrivate::addAction().
Definition at line 5779 of file qapplication.cpp.
Referenced by qt_mac_menu_event().
|
static |
Definition at line 1617 of file qmenu_mac.mm.
Referenced by QStyleSheetStyle::drawControl(), findMenubarForWindow(), getFcPattern(), QGtkStylePrivate::getGConfBool(), QGtkStylePrivate::getGConfString(), QGtkStylePrivate::isThemeAvailable(), QMenuBarPrivate::macCreateMenuBar(), QMenuBarPrivate::macDestroyMenuBar(), and QIcon::paint().
const UInt32 kMenuCreatorQt = 'cute' |
Definition at line 82 of file qmenu_mac.mm.
Referenced by QMenuBarPrivate::QMacMenuBarPrivate::addAction(), QMenuPrivate::QMacMenuPrivate::addAction(), QMenuBarPrivate::macMenu(), QMenuPrivate::macMenu(), QMenuPrivate::QMacMenuPrivate::merged(), qt_mac_activate_action(), qt_mac_create_menu(), qt_mac_menu_event(), qt_mac_menu_merge_action(), qt_mac_set_modal_state(), qt_mac_widget_in_menu_eventHandler(), QMenuBarPrivate::QMacMenuBarPrivate::syncAction(), QMenuPrivate::QMacMenuPrivate::syncAction(), QMenuBarPrivate::QMacMenuBarPrivate::~QMacMenuBarPrivate(), and QMenuPrivate::QMacMenuPrivate::~QMacMenuPrivate().
QWidget* mac_keyboard_grabber |
Definition at line 157 of file qwidget_mac.mm.
Referenced by QWidget::keyboardGrabber().
|
static |
Definition at line 521 of file qmenu_mac.mm.
Referenced by qt_mac_cleanup_menu_event(), and qt_mac_create_menu_event_handler().
|
static |
Definition at line 522 of file qmenu_mac.mm.
Referenced by qt_mac_cleanup_menu_event(), and qt_mac_create_menu_event_handler().
|
static |
Definition at line 385 of file qmenu_mac.mm.
Referenced by qt_mac_create_menu_event_handler().
|
static |
Definition at line 393 of file qmenu_mac.mm.
Referenced by qt_mac_create_menu().
bool modal |
Definition at line 99 of file qmenu_mac.mm.
Referenced by QMessageBox::critical(), QMenuBarPrivate::macUpdateMenuBarImmediatly(), qt_mac_clear_menubar(), qt_mac_mouse_inside_answer_rect(), QWidgetPrivate::setModal_sys(), QSoftKeyManager::softkeySource(), and QAxClientSite::windowActivationChange().
Definition at line 98 of file qmenu_mac.mm.
Referenced by QMenuPrivate::activateCausedStack(), and qt_mac_activate_action().
struct { ... } qt_mac_current_menubar |
|
static |
Definition at line 81 of file qmenu_mac.mm.
Referenced by QMenuBarPrivate::QMacMenuBarPrivate::addAction(), and QMenuPrivate::QMacMenuPrivate::addAction().
int qt_mac_menus_open_count = 0 |
Definition at line 76 of file qmenu_mac.mm.
Referenced by qt_mac_menu_event(), and qt_mac_menubar_is_open().
bool qt_mac_no_menubar_merge = false |
Definition at line 74 of file qmenu_mac.mm.
Referenced by QMenuPrivate::QMacMenuPrivate::addAction(), QMenuBarPrivate::macMenu(), qt_mac_menu_merge_action(), and qt_mac_set_menubar_merge().
bool qt_mac_quit_menu_item_enabled = true |
Definition at line 75 of file qmenu_mac.mm.
Referenced by QApplicationPrivate::globalAppleEventProcessor(), and qt_mac_command_set_enabled().
|
static |
Definition at line 305 of file qmenu_mac.mm.
Referenced by QMenuPrivate::QMacMenuPrivate::addAction().